Choose Language Hide Translation Bar
Highlighted
Kaisuli
Level I

How to change the millennium

Hi,

I have a column with dates, they are in the form ddmmyy. All the dates are before the year 2000. Now I want these to d.m.y. I used the Informat, and I got the dates but they are in the future!! For example 101049 turns out 10.10.2049.

 

How can I get thousand years off?

2 REPLIES 2
Highlighted
txnelson
Super User

Re: How to change the millennium

I would use the following formula.  

Date MDY(
	Num( Substr( :Date, 1, 2 ) ),
	Num( Substr( :Date, 3, 2 ) ),
	Num( "19" || Substr( :Date, 5, 2 ) )
)

Attached is a simple data table with the formula applied

Jim
Highlighted
Craige_Hales
Staff (Retired)

Re: How to change the millennium

If you are importing from a text file, there is a preference for this:

Capture.PNG

the two-digit year rule lets you specify which decades a two digit value encodes.

Craige
Article Labels

    There are no labels assigned to this post.