Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Date format


From   Lars Folkestad <lfolkestad@health.sdu.dk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Date format
Date   Sat, 29 Sep 2012 20:08:54 +0200

Im note sure if i know what you want to do, but splitting your date variable 31mar2011 into three variables Day Monte year you could easily list your observation by year and month and day and month and so forth.

See more Here: 
http://www.stata.com/support/faqs/data-management/creating-date-variables/

Or Here:
http://www.ats.ucla.edu/stat/stata/modules/dates.htm

Mvh
Lars Folkestad


Den 29/09/2012 kl. 19.39 skrev "Sebastian Skalitzky" <sebastian.skalitzky@googlemail.com>:

> okay seems ym, right?
> 
> 2012/9/29 Sebastian Skalitzky <sebastian.skalitzky@googlemail.com>:
>> Hello all,
>> 
>> I am having a problem with my date variable. I want to list all
>> observations which occurred at the same date.
>> Therefore I tried the following line:
>> 
>> list date if==31mar2011
>> 
>> however I receive the following message
>> 
>> 31mar2011 invalid name
>> r(198);
>> 
>> Some information on the variable date:
>> Type: long
>> Format: %d
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index