BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,
I am new in SAS and I use version 9.0.
I have a table with a column formated YYMMDD8 that displays a date as following: 20020102.
If I change the format from the column attributes by selecting the format d as from within the list of formats, the value 20020102 is changed into 15342.
Can someone tell me what is this format and what is this new value 15342 and how SAS calculated this value?

The descritpion of format d is "Writes significant", what does that mean?

Thank you very much for your help.
2 REPLIES 2
Doc_Duke
Rhodochrosite | Level 12
SAS stores dates internally as the number of days from 1/1/1960. The d format shows the internal number and lines up on the decimal. Format and date documentation can be found at the SAS online documentation site:

http://support.sas.com/documentation/onlinedoc/sas9doc.html

Doc
deleted_user
Not applicable
Thank you very much.
I understand now why I've got 15342. it is the difference between 1/1/1960 and my 1/2/2002.

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 664 views
  • 1 like
  • 2 in conversation