Subtract 1 hour from 00:00 time so that the Date could also be changedHello JMP community,
Is there any way to subtract 1 hour from 00:00 time so that the Date could also be converted to the previous data?
For example:
The input table is Expected Output should be
Any suggestions would be highly appreciated.
Regards
ScriptingRe: Subtract 1 hour from 00:00 time so that the Date could also be changedHere is how I would do it

Names Default To Here( 1 );
dt = Current Data Table();
For Each Row(
datetime = :date + 60 * 60 * Hour( :time ) + 60 * Minute( :time );
datetime = datetime - In Hours( 1 );
:new time = Hour( datetime ) * 60 * 60 + Minute( datetime ) * 60;
:new date = Date MDY( Month( datetime ), Day( datetime ), Year( datetime ) );
);