cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
chandankishor66
Level III

Subtracting number of hours from Date and time

HI,

 

I want to subtract 6 hrs in 05-07-2022 01:00  so final value should be  04-07-2022 19:00
Can you please suggest me how perform this calculation in JMP16.

 

Many thanks

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Subtracting number of hours from Date and time

Use the In Hours() function

Date = Informat( "05/07/2022 01:00:00", "m/d/y h:m:s" );
New Date = Date - In Hours( 6 );
Show( Format( New Date, "m/d/y h:m:s" ) );

Displays

Format(New Date, "m/d/y h:m:s") = "05/06/2022 7:00:00 PM";
Jim

View solution in original post

1 REPLY 1
txnelson
Super User

Re: Subtracting number of hours from Date and time

Use the In Hours() function

Date = Informat( "05/07/2022 01:00:00", "m/d/y h:m:s" );
New Date = Date - In Hours( 6 );
Show( Format( New Date, "m/d/y h:m:s" ) );

Displays

Format(New Date, "m/d/y h:m:s") = "05/06/2022 7:00:00 PM";
Jim