cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
ted_ellefson
Level III

Date Format help please

Please help me with changing my date time column into a useful JMP column

my formay is yyyymmdd hhmmss

(There is a space in the middle)

example is 20191125 132435 for a Nov 25, 2019 at 1:24 pm 35 secons

I'm not sure how to convert this into a useful JMP format.

I've looked through the multiple date/time related posts, but still don't understand what to do.  Thank you in advance!!!

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Date Format help please

Attached is a data table with the conversion formula included.  Here is the formula being used

datetime.PNG

Date MDY(
	Num( Substr( :my Date, 5, 2 ) ),
	Num( Substr( :my Date, 7, 2 ) ),
	Num( Substr( :my Date, 1, 4 ) )
) + Num( Substr( :my Date, 10, 2 ) ) * 3600
+Num( Substr( :my Date, 12, 2 ) ) * 60
+Num( Substr( :my Date, 14, 2 ) )
Jim

View solution in original post

4 REPLIES 4
ron_horne
Super User (Alumni)

Re: Date Format help please

Hi @ted_ellefson 

please try this:

https://community.jmp.com/t5/Discussions/Customized-Date-Formats/td-p/2974 

 

let us know if it worked,

Ron

txnelson
Super User

Re: Date Format help please

Attached is a data table with the conversion formula included.  Here is the formula being used

datetime.PNG

Date MDY(
	Num( Substr( :my Date, 5, 2 ) ),
	Num( Substr( :my Date, 7, 2 ) ),
	Num( Substr( :my Date, 1, 4 ) )
) + Num( Substr( :my Date, 10, 2 ) ) * 3600
+Num( Substr( :my Date, 12, 2 ) ) * 60
+Num( Substr( :my Date, 14, 2 ) )
Jim
ted_ellefson
Level III

Re: Date Format help please

THANK-YOU.  The formula works very well.

This Community is awesome

Re: Date Format help please

Or you may use the data table tools add-in from brady brady, which allows to convert your date values (as character type in your data table) to a numeric date format while setting the splitpoints, matching the parts to the day/month/year/... and saving this into a new column.

https://community.jmp.com/t5/JMP-Add-Ins/Data-Table-Tools-Add-in/ta-p/28582 

There you'll find the instruction document as well, the option you will need is  under: 

Data Table Tools -> Special Formula Columns -> Custom Date Formula Writer

The formula you get is the same as @txnelson created.

/****NeverStopLearning****/