You really need to get a clear understanding about your external data representation, specifically that you are working with a character-string of data that appears as a date-time. And within SAS, you must convert that string to a SAS numeric DATETIME (or DATE) variable value, so that SAS functions can operate on the resulting numeric value (represented as either a datetime value ( "seconds since 1/1/1960") or a date value ("days since 1/1/1960").
The SAS Language Dictionary and SAS Language Concepts guides each have reference material on this topic, and also the SAS support website has technical / conference papers on the topic.
Until you devote time to self-initiated review and attention, these facilities will continue to course you have suggested.
Scott Barry
SBBWorks, Inc.