Hi,
I am importing a csv file with date stamp and time stamp into SAS. In my csv (text) file, I have a column titled date with the date format DD-MMM-YYYY (e.g., 20-May-2008). When I import this file in SA, the date stays the same as above (i.e. 20-May-2008) but when I look at either its format or informat for date I see $11.
I tried changing the format to a date format in SAS but with no success. I want to be able to convert this into a date format to do some calculations.
Similarly, I also have another separate column in the same csv that stores time in the format HH:MM:SS.LLL (e.g., 13:29:54.164). I see the same thing in SAS but the format is now $12.
Again, I tried converting this to a time format but SAS keeps coming up with error messages (invalid format, etc).
In summary, how can I format the date back to DD-MMM-YYYY and time to HH:MM:SS.LLL I know it may be a simple question but I am learning SAS day by day so I appreciate the help.
Cheers,
C+
I am importing a csv file with date stamp and time stamp into SAS. In my csv (text) file, I have a column titled date with the date format DD-MMM-YYYY (e.g., 20-May-2008). When I import this file in SA, the date stays the same as above (i.e. 20-May-2008) but when I look at either its format or informat for date I see $11.
I tried changing the format to a date format in SAS but with no success. I want to be able to convert this into a date format to do some calculations.
Similarly, I also have another separate column in the same csv that stores time in the format HH:MM:SS.LLL (e.g., 13:29:54.164). I see the same thing in SAS but the format is now $12.
Again, I tried converting this to a time format but SAS keeps coming up with error messages (invalid format, etc).
In summary, how can I format the date back to DD-MMM-YYYY and time to HH:MM:SS.LLL I know it may be a simple question but I am learning SAS day by day so I appreciate the help.
Cheers,
C+