Statalist The Stata Listserver


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

Re: st: timestamps and time


From   Joseph Coveney <[email protected]>
To   Statalist <[email protected]>
Subject   Re: st: timestamps and time
Date   Tue, 28 Feb 2006 17:25:54 +0900

Brad De Groot wrote:

Would someone please direct me to descriptions of how to handle
timestamps and times? I'm trying to use transaction timestamps from a
relational database to display circadian patterns for system utilization
through different interfaces and form factors. I htought it would be
straightforward, but I have found the right sections of documentation or
statalist archives.

--------------------------------------------------------------------------------

-egen- has some time commands via the -egenmore- package (available from
SSC).  Kit Baum just posted that he's updated a couple of his contributions
to the package in a couple of the commands that he contributed to it.

There's also a, uh, timely article by Nick Cox on the topic in the current
issue of _The Stata Journal_.  The electronic version of the issue's just
come out this morning.

If you retrieve the timestamps in ISO 8601 format, then the data will sort
correctly naturally as a string, and you can use either -split-, parsing on
the "T", or -substr()- to get time alone for circadian analysis.  You can
use one of the commands mentioned in the article to convert to
numeric--fraction of the day, seconds from midnight, etc., although it's not 
difficult to do the conversion from scratch.

Joseph Coveney

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