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: How to replace a missing date with value?

From   "Kanter, Rebecca" <>
To   "" <>
Subject   st: How to replace a missing date with value?
Date   Mon, 21 Jan 2013 11:53:22 -0500

Dear list,

I am trying to replace date value that was missing (.) with the actual value that I now have.

Given that date1 is a date (DMY) variable in %dM_d,_CY format..

I do not understand why the below code does not result in the requested change to change date1==. (MISSING) to date1=29feb2001

replace date1 = date("29-02-2001","DMY") in 23 (via edit)
(0 real changes made)

 replace date1 = date("02-29-2001","DMY") if  id=="12345" (via command screen)
(0 real changes made)

Any help you can provide would be much appreciated.

Thank you so much,
Rebecca M. Kanter, PhD
Johns Hopkins Bloomberg School of Public Health
Department of International Health
Center for Human Nutrition
*   For searches and help try:

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