Desktop productivity for business analysts and programmers

date Format issue

Reply
N/A
Posts: 0

date Format issue

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.
Trusted Advisor
Posts: 2,114

Re: date Format issue

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
N/A
Posts: 0

Re: date Format issue

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.
Ask a Question
Discussion stats
  • 2 replies
  • 118 views
  • 1 like
  • 2 in conversation