E_T
E_T

Reputation: 33

SAS Specific Date format

I've found several questions regarding SAS dates in this forum, but i haven't been able to find the answer to this one. I think it is rather simple, but i can't get it right.

I have a data set with a date (DD-MM-YYYY) which for some reason has a Character format. I would like it to be translated into a date format (YYYY-MM-DD). I can get it to 'look' right by by separating and concatenating the parts, but, then i can't get the format right.

Upvotes: 3

Views: 445

Answers (1)

Vicky
Vicky

Reputation: 13244

Use the input() function with an appropriate informat:

datevariable=input(textvariable,ddmmyy10.);

Upvotes: 5

Related Questions