04-05-2018 11:23 AM
04-05-2018 11:25 AM
INPUT() converts and you can try ANYDTDTM. for a datetime
I have a col classified character $31
Here is example.
Format day mmddyy10.;
I used that b4 the input to convert it.
04-05-2018 11:37 AM
04-05-2018 12:05 PM
You didn't apply the format correctly and since it's a date time, it creates a date time. You can display it as a date using DTDDMMYY10 or DTDATE9 or convert it using DATEPART() to get the date portion.
It converted to number here is code
DayTime = input(day,ANYDTDTM.);
date = datepart(dayTime);
FORMAT DAY dtdate9. date ddmmyy10.;
04-05-2018 11:48 AM
Even simpler (the FORMAT statement is still necessary):
day = input(opendate, yymmdd10.);
That assumes your character variable OPENDATE is left-hand-justified.
Need further help from the community? Please ask a new question.