Hi:
Once you have read your variable successfully, the number is stored internally as the number of SECONDS since January 1, 1960. so, as you can see from your "separated" DATE and TIME variables, you have successfully extracted the values from the internally stored number.
The way to control the DISPLAY of a variable (especially a variable whose value represents a date, a time or a date/time) is through the use of a FORMAT generally a statement (but for some procedures it is the FORMAT option). You have applied a FORMAT to the DATE variable (DATE9.) and to the TIME variable (time8.) in the following statements:
[pre]
format date date9.;
format time time8.;
[/pre]
But just because you used an INFORMAT to read the value of the DATETIME variable, a FORMAT will not automatically be applied. An INFORMAT only controls how a variable is read INTO SAS. A FORMAT controls how a variable is DISPLAYED, such as with PROC PRINT or any reporting procedure.
So, you will need to apply a FORMAT to the DATETIME variable, such as:
[pre]
format date date9. time time8. datetime datetime20.;
OR
format date ddmmyy10. time time8. datetime E8601DT20.;
[/pre]
To find out the available list of formats to use for your DATETIME variable, you can search the documentation for the topic "Functions by Category". I show two possible formats above. If the available pre-defined formats are not adequate to your needs, then PROC FORMAT allows the use of "date-time directives" in order to give you the opportunity to format date and time and date/time variables in almost any fashion you want.
The documentation on the use of date-time directives with PROC FORMAT is here:
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473467.htm (looks specifically at using DATATYPE= and how to specify values for the PICTURE statement.)
and some other useful information is here:
http://support.sas.com/kb/24/621.html
http://www2.sas.com/proceedings/sugi31/243-31.pdf (picture formats for date/time variables starts on page 14 -- but the rest of the paper is worth reading, too.)
cynthia