Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: dates

From   Michael Eisenberg <[email protected]>
To   [email protected]
Subject   st: dates
Date   Thu, 6 Oct 2011 08:05:21 -0700


I have a list of visit dates for patients.  Unfortunately, the format
is not constant.

Most are listed with the year, month, day such as 20080105 for Jan 5,
2008 but some are listed only with the year and month 200801 for Jan

I attempted to convert them into stata dates with the commands below
without success.

gen ndate = date(dx_date, "YMD")
gen ndate = date(dx_date, "CCYYNNDD")

Can stata handle such inconsistent data?

Thanks in advance.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index