- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 07-30-2009 10:41 AM
(1249 views)
I have a field ship_date 19NOV2008:00:00:00.
How to convert it to 19NOV2008 excluding the time part?
How to convert it to 19NOV2008 excluding the time part?
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
sasdate = DATEPART(sas_datetime);
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
More specifically, SAS distinguishes numeric DATE and DATETIME variables; also the internal value (number) represents days since 1/1/1960. And to display the value in a particular format, you apply a SAS FORMAT statement.
The SAS support website http://support.sas.com/ provides SAS-hosted product documentation and supplemental technical and conference papers on this type of topic - you can use the website's SEARCH facility or use Google.
Scott Barry
SBBWorks, Inc.
SAS Language: About SAS Date, Time, and Datetime Values
http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a002200738.htm
Looking for a Date? A Tutorial on Using SAS® Dates and Times
Arthur L. Carpenterm California Occidental Consultants
http://www2.sas.com/proceedings/sugi30/255-30.pdf
The SAS support website http://support.sas.com/ provides SAS-hosted product documentation and supplemental technical and conference papers on this type of topic - you can use the website's SEARCH facility or use Google.
Scott Barry
SBBWorks, Inc.
SAS Language: About SAS Date, Time, and Datetime Values
http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a002200738.htm
Looking for a Date? A Tutorial on Using SAS® Dates and Times
Arthur L. Carpenterm California Occidental Consultants
http://www2.sas.com/proceedings/sugi30/255-30.pdf