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: Date format


From   Lars Folkestad <[email protected]>
To   "[email protected]" <[email protected]>
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" <[email protected]>:

> okay seems ym, right?
> 
> 2012/9/29 Sebastian Skalitzky <[email protected]>:
>> 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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index