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: Dates in result window


From   Ronnie Babigumira <[email protected]>
To   [email protected]
Subject   Re: st: Dates in result window
Date   Tue, 4 Feb 2014 13:14:57 +0100

Not an answer to the -tab- options but you could try -fre- (-ssc
install fre-) , it appears to keep the format

Also, if you simply want to tabulate the date variable, could be to
generate a string version (using the format option of -tostring-) and
tabulate the string version

******
clear *

input str20 date1
04jun2007
06nov2012
26nov2012
30dec2012
28feb2013
28may2013
19sep2013
end

g date2 = date(date1, "DMY")
format date2 %dDD/NN/CCYY

tab date2
fre date2

******

On Tue, Feb 4, 2014 at 6:01 AM, rasool.bux <[email protected]> wrote:
> Dear  All,
>
> When I tabulate the date variable it is not displaying in the format which is defined in the data i.e. %dDD/NN/CCYY. When I list it is showing in the said format.
>
> . tab date_6 in 1/10
>
>      date_6 |      Freq.     Percent        Cum.
> ------------+-----------------------------------
>   04jun2007 |          1       10.00       10.00
>   06nov2012 |          2       20.00       30.00
>   26nov2012 |          1       10.00       40.00
>   30dec2012 |          1       10.00       50.00
>   28feb2013 |          1       10.00       60.00
>   28may2013 |          1       10.00       70.00
>   19sep2013 |          3       30.00      100.00
> ------------+-----------------------------------
>       Total |         10      100.00
>
> . list date_6 in 1/10
>
>      +------------+
>      |     date_6 |
>      |------------|
>   1. | 06/11/2012 |
>   2. | 19/09/2013 |
>   3. | 19/09/2013 |
>   4. | 19/09/2013 |
>   5. | 28/05/2013 |
>      |------------|
>   6. | 04/06/2007 |
>   7. | 28/02/2013 |
>   8. | 06/11/2012 |
>   9. | 30/12/2012 |
> 10. | 26/11/2012 |
>      +------------+
>
> Is there any option to set the display format for the result window with tabulate or any other command?
>
> Thanks
> Rasool Bux
>
> ________________________________
>
> This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
>
>
> *
> *   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