08-04-2017 10:31 AM
If you import the properly, with a datastep and infile, and you read that data as a date-time, then you already have the date. You can extract it using the function datepart(). Thus is fouy want a character version you would just add:
08-04-2017 10:42 AM
If you use the ANYDTDTE. informat it will read it and store just the date part as a date value.
Or use the ANYDTDTM. informat and it will create a datetime value. You could then use DTDATE. formar to just display the date. or use the DATEPART() function to extract the date.
08-04-2017 01:29 PM
I'm with @Tom on this. I read lots of files with that date (almost time) field as dates because the data source exposes data as date and time but the time values are invariate (all 12:00:00 AM for example). Why anyone lets "time" become part of something when it never changes continues to annoy me greately.