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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1288 views
  • 1 like
  • 2 in conversation