Bookmark and Share

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


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

Re: st: a simple question


From   Sergiy Radyakin <[email protected]>
To   [email protected]
Subject   Re: st: a simple question
Date   Wed, 2 Feb 2011 10:22:51 -0500

generate y=x-2

make sure both x and y are formatted with the date format

Best, Sergiy



On Wed, Feb 2, 2011 at 10:13 AM, Ricardo Castro <[email protected]> wrote:
> Hi,
>
> I have a dataset with dates in Stata format. I need to create a
> variable with the dates 2 days before the dates I have already.
> I mean if I have 01Jan1999 I need to create a variable 30Dec1998, an
> so on for all the dates, but haven't been able to write a useful code
> for doing that.
> Can you help me?
>
> Many thanks!
>
> Ricardo Castro MD
>
> MMPH Program - Graduate School of Public Health
> University of Pittsburgh
> 111 Parran Hall, 130 Desoto Street
> Pittsburgh, PA 15261
> www.publichealth.pitt.edu
>
> Research Scholar
> University of Pittsburgh Medical Center
> Department of Critical Care Medicine
> CRISMA Center
> 605 Scaife Hall, 3550 Terrace Street
> Pittsburgh, PA 15261
>
> Tel: +1 412 647 8319
> Fax: +1 412 647 8060
> www.ccm.upmc.edu
>
> email: [email protected]
> email: [email protected]
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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