cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
‘New to using JMP? Hit the ground running with the Early User Edition of Discovery Summit – register now, free of charge.
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
Choose Language Hide Translation Bar
chandankishor66
Level III

Adjust only the hour values in DD-MM-YY H:M:S

HI JMP users,

 

I have a column that contains data in the format DD-MM-YY H:M:S (screenshot attached below), and I would like to adjust only the hour values to make them even. For example, I want to change a time like 13-07-2023 15:00 to 13-07-2023 16:00. Is there a method to modify only the hour values across the entire column?

 

chandankishor66_0-1697097944810.png

Regards, 

1 REPLY 1
jthi
Super User

Re: Adjust only the hour values in DD-MM-YY H:M:S

You can write a formula to do this. You can use Hour() function to get the hour, perform your calculation and then add it back with In Hours() (time in jmp is stored as seconds sice 1.1.1904Using dates, times, datetimes and durations in JMP ). Also be careful with midnight (you can just check if Hour is uneven -> add hour to the time)

-Jarmo