Recommended Google advanced search argument for this topic/post:
sas datetime values site:sas.com
Also, there are SAS functions DATEPART and TIMEPART, if you want to split a DATETIME variable. And, as Cynthia mentioned, it's key to apply the proper SAS format as you desire the output to be displayed, since SAS DATE and DATETIME variables are numeric internally, as can be picked-up from the DOC references.
there are informats like IS8601xx (in SAS9) which I think are designed to handle these types of date and time data formats.
There is also ANYDTDTM informat which would search for a suitable datetime informat. It gave me these results (SAS9.1.3 sp4)
436 %put %sysfunc( inputn( %str(2009-03-24T09:00), anydtdtm), datetime );
437 %put %sysfunc( inputn( %str(2009-03-24T09:00:00), anydtdtm), datetime );
This shows that the informat ANYDTDTM expects the seconds to be provided.
So does IS8601DT.