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
LEARNING
Level I

New Character Column Based on Date Range

Hi Everyone,

 

New to JMP here.  I have a Date/Time table where I would like to establish a conditional new column that if the date is > 1/1/2024, then return a character of "After."  If this is not met, return "Before."  I have tried the formula editor but still having issues.....just blanks in the rows.

 

Thanks!

2 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User

Re: New Character Column Based on Date Range

Assuming your DateTime column is a numeric JMP DateTime column the below formula will work

If( :Event Date < Informat( "01/01/2024", "m/d/y" ),
	"Before",
	"After"
)
Jim

View solution in original post

hogi
Level XII

Re: New Character Column Based on Date Range

Via the GUI, you can use Custom Binning:

hogi_0-1724504187864.png
and use custom labels:

hogi_2-1724504339366.png

 

hogi_1-1724504271574.png



To adjust the settings, use

hogi_3-1724504440360.png

View solution in original post

4 REPLIES 4
txnelson
Super User

Re: New Character Column Based on Date Range

Assuming your DateTime column is a numeric JMP DateTime column the below formula will work

If( :Event Date < Informat( "01/01/2024", "m/d/y" ),
	"Before",
	"After"
)
Jim
hogi
Level XII

Re: New Character Column Based on Date Range

Via the GUI, you can use Custom Binning:

hogi_0-1724504187864.png
and use custom labels:

hogi_2-1724504339366.png

 

hogi_1-1724504271574.png



To adjust the settings, use

hogi_3-1724504440360.png

Re: New Character Column Based on Date Range

@txnelson provided the formula. In this case, you do not need to call the In Format() function. You can use a convenient literal date value.

If( :Event Date < 01Jan2024,
	"Before",
	"After"
);
LEARNING
Level I

Re: New Character Column Based on Date Range

Thank you very much both!  There is so much power in JMP.....I am really looking forward to learning more!

 

Cesar