BookmarkSubscribeRSS Feed
SASPhile
Quartz | Level 8
I have a field ship_date 19NOV2008:00:00:00.
How to convert it to 19NOV2008 excluding the time part?
2 REPLIES 2
Flip
Fluorite | Level 6
sasdate = DATEPART(sas_datetime);
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 608 views
  • 0 likes
  • 3 in conversation