Hello!
1652335737
to
2022/05/12 14:08:57
Thanks!
The formula to make the modification is:
1652335737 + Informat( "01/01/1970", "mm/dd/yyyy" ) + In Hours( 8 )
The addition of the 8 hours in the calculation, is that apparently the start time for the 01/01/1970 is 08:00:00
This JSL displays the new calculated value from the formula
Show( Format( 1652335737 + Informat( "01/01/1970", "mm/dd/yyyy" ) + In Hours( 8 ), "yyyy-mm-ddThh:mm:ss" ) );
Format(1652335737 + Informat("01/01/1970", "mm/dd/yyyy") + In Hours(8), "yyyy-mm-ddThh:mm:ss") = "2022-05-12T14:08:57";
OK
How do reverse this calculation?For example, calculate the date 20230214 into seconds
In Days( Informat( Char( 20230214 ) ) -In Hours( 8 ) ) - In Days( 1jan1970 )
??
1676304000000
Names Default To Here( 1 ); date = "20230214"; // The JMP time values are based upon the number of seconds // since January 1, 1904, therefore the calculation to the // number of seconds since then would be JMPDate = Date MDY( num(substr(date,5,2)), num(substr(date,7,2)), num(substr(date, 1, 4))); show(JMPDate, format(JMPDate,"m/d/y")); // To convert this to the number of seconds since January 1, 1970 Jan1970Date = JMPDate - informat("01/01/1970", "m/d/y"); show(Jan1970Date);