cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
bhpan
Level I

Similar function same as excel

Need help on similar function for grouping date/time on new column same as excel <FLOOR(S2,"3:00")>

4 REPLIES 4
txnelson
Super User

Re: Similar function same as excel

Here is one way to handle it, assuming that the S2 value is in a column called Column 1 in the JMP Data table

Informat( Short Date( :Column 1 ), "mm/dd/yyyy" )

Here is another

Date MDY( Month( :Column 1 ), Day( :Column 1 ), Year( :Column 1 ) )

t1.PNG

Jim
Mauro_Gerber
Level IV

Re: Similar function same as excel

I assume you mean round to the date so you can tabulate over it.

formula: :Column1- Time Of Day( :Column1 )

 

or: right click on the column header --> New Formula Column --> Date Time --> Date will do the same

 

date.png

 

"I thought about our dilemma, and I came up with a solution that I honestly think works out best for one of both of us"
- GLaDOS
Georg
Level VII

Re: Similar function same as excel

I think you want to floor the time to the same value for each 3 hour range. 

This works  by

Floor( :date / (3 * 60 * 60) ) * (3 * 60 * 60)

assuming :date is the original column.

First the original date is divided so that 1 is a step of 3 hours (3 hours x 60 min x 60 s, JMP calculates in seconds), than floor is applied, than it is calculated back to the original range.

Georg

Re: Similar function same as excel

This choice is perhaps a matter of personal preference, but JMP provides many functions for date and time values, which can present difficult boundary conditions. (For example, think leap years. Not to worry in this case, but a general caution.) So this case might use this function:

 

Floor( :date / In Hours( 3 ) ) * In Hours( 3 ) )