Subscribe Bookmark RSS Feed

convert number to date

patrick_rooney

Community Trekker

Joined:

Dec 3, 2015

I have numeric data in the form of, e.g., 8601representing 1/1986.

I want to convert it to a JMP data value in order to be able to do arithmetic on it.

I'm using the formula below and am getting dates in the 21st century (e.g., 2086 when I want 1986).

any help on changing the formula or a workaround to get the 20th century dates I want?

10916_JMP_MDY_formula.jpg

2 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

The solution is pretty easy.  All that has to be done is to concatenate "19" to the front of the year value you are stripping off of ODATEW

Date MDY(Num("19"||Right(Char(ODATEDW),2)),1,Num(Left(Char(ODATEDW),2))

Jim
patrick_rooney

Community Trekker

Joined:

Dec 3, 2015

Thank you, works great