Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Converting from SAS date format to STATA (Stata)(sic...NICK?)

From   Dan Blanchette <>
Subject   Re: st: Converting from SAS date format to STATA (Stata)(sic...NICK?)
Date   Tue, 15 Mar 2005 16:18:50 -0500 (EST)

. format my_date %dN/D/CY

looks like the format that your are looking for.  The "N" stands for "number"
where %dM/D/Y would print the month name.

You might find my webpage helpful.

A SAS User's Guide to Stata:


Mary Clouser wrote:
I have the following problem in a data set.  All dates are currently recorded in
the SAS date format.   That means they are positive or negative numbers
depending on whether they were before or after day "0": 1-January-1960   I have
yet to find a way to get them converted to STATA with the actual date
(01/01/1960 for instance) in the record.  Can anyone help me?

Thanks in advance
Mary Clouser


*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index