Consider -ntimeofday- and -stimeofday- from Stata Journal 6(1) 2006.
Nick
[email protected]
Ali Khashan
> Thanks Maarten, I am still using Stata 8. Is there a code in stata 8?
Maarten buis
> > --- Ali Khashan <[email protected]> wrote:
> >> I want to format a date variable.
> >> I tried these codes:
> >> gen nDate=date(sDate, "dm19y")
> >> format nDate %dD_m_CY
> >>
> >> However they did not work and then I realised that the
> dates included
> >> time
> >> "03/02/2005 00:00".
> >>
> >> Is there a stata code which can deal with this date?
> >
> > Yes, this was introduced in Stata 10, see: -help date and time-.
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/