Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Date + Time of Day

From   "David Harrison" <[email protected]>
To   <[email protected]>
Subject   st: RE: Date + Time of Day
Date   Wed, 15 Jun 2005 15:34:15 +0100

As an alternative to Joseph's ODBC suggestion... If you have StatTransfer, then you can bring the data into Stata with -inputst- and this will bring the date/time field in as a numeric daily date with a fractional part representing the time.

For example 6pm today would be 16602.75

The only problem with this is that Stata has no date/time display format, so with %d display format this would just show "15jun2005".


-----Original Message-----
From: Eric G. Wruck [mailto:[email protected]]
Sent: 15 June 2005 14:41
To: [email protected]
Subject: st: Date + Time of Day

I have an Excel spreadsheet which includes a date column & dates are 
in the following form:

11/14/2000  16:27:00

That is, the date includes the time of day.  I've searched my Stata 9 
manuals & all I can find on time is part of c(return) where one can 
use c(current_time) but this doesn't seem relevant/helpful.

Is there a format that includes time as part of a date, or do I have 
to parse this field out & create my own separate time variable?  What 
do others do to handle this?





        Eric G. Wruck
        2535 Sherwood Road
        Columbus, OH  43209

        ph:      614.231.5034
        cell:    614.330.8846
        eFax:    614.573.6639
        eMail:   [email protected]

*   For searches and help try:

*   For searches and help try:

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