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]

st: converting date format


From   "Bosch, Darrell" <[email protected]>
To   <[email protected]>
Subject   st: converting date format
Date   Mon, 22 Jul 2013 14:29:59 -0400


I have a dataset with data entered by quarter from 1947 to 2012.  The following date variable indicates the dates of each observation (month/day/year). 
01/01/1947         
04/01/1947         
07/01/1947         
...
...
01/01/2012         
04/01/2012         
07/01/2012         
10/01/2012         

I would like to convert the dates to quarters as follows:
1947q1
1947q2
1947q3
Etc.

Any suggestions on how to do this would be appreciated. 

Darrell Bosch



*
*   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