Statalist


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

st: AW: AW: RE: Extract Year from String


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: AW: RE: Extract Year from String
Date   Tue, 13 Oct 2009 22:12:26 +0200

<> 

That is

*************
help dates_and_times
*************

of course...

HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Martin Weiss
Gesendet: Dienstag, 13. Oktober 2009 22:04
An: statalist@hsphsun2.harvard.edu
Betreff: st: AW: RE: Extract Year from String


<> 

There is an entry in 


*************
-help date_an_times-
*************

that says:

"    Historical note:  Stata 10's date() function is much improved over that
of previous versions, and the mask is
        specified a little differently.  In previous versions, the codes for
year, month, and date were y, m, and d
        rather than Y, M, and D.  Under version control, the old codes are
allowed and, in fact, the original date()
        function is used.

        The big advantage of Stata 10's date() is that it will translate
run-together dates such as 20061201 (no
        special action by you required) and translate more complicated date
strings such as Wed Dec 01 14:22:43 CST
        2006 (special action required in how mask is specified, something
that the old date() would not have
        understood)."


HTH
Martin

-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von jasonm@ucla.edu
Gesendet: Dienstag, 13. Oktober 2009 21:54
An: statalist@hsphsun2.harvard.edu
Betreff: st: RE: Extract Year from String

Is there anything similar for v9.2?

**************
di  year(dofc(clock("Dec/17/1998 11:30:00 PM", "MDY hms")))
**************

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


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index