Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Stimeofday command problem


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Stimeofday command problem
Date   Fri, 26 Oct 2007 17:04:03 +0100

If you are using Stata 10, use the date and time functions instead. 

Otherwise my recollection of this user-written command is that you need
to specify explicitly that . act as punctuation. Also you need to start
with values like 14.41.37 as strings, in which case you probably want 
-ntimeofday-. 

Nick
[email protected] 

Paola Paiardini

I am a neophyte of Stata.
I have a time variable in my database "time", which takes for example
the value 14.41.37, that is hours, minutes and seconds, but Stata
change it in .61223382.
I red about the stimeofday command and I tried to use it, typing  this
command:

stimeofday time, gen(hours) n(s) s(h m s) timeonly am(" am") pm(" pm")

but the output is:

(1436t missing values generated)
type mismatch
r(109);

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



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index