cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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

Recommended Articles