Hi Nick,
thanks for the suggestions!
33824 = 8th August 1992 in Excel.
My variable looks like:
33824
5/25/1995
2/27/1995
33610
5/23/1995
6/22/2000
35550
and so on, 1941 cases in one long column and it's a string.
Vania
-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Nick Cox
Sent: 01 April 2003 16:49
To: [email protected]
Subject: st: RE: dates
Vania Gerova
> I have a string variable containing dates. Unfortunately
> the dates are in
> different formats. One of the formats is a datevalue, like
> 33824, which
> seems to represent 08/08/1992, i.e. dd/mm/yyyy (European
> format).
. di mdy(8,8,1992) - mdy(1,1,1900)
33822
I have read that there is a bug regarding 29 Feb 1900, which
didn't happen, but did according to some software. I don't know
if that helps or not.
> The other type is an American date format, i.e. m/dd/yyyy
(5/25/1995).
> So the variable looks like:
Use
. di date("5/25/1995", "mdy")
12928
Nick
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/