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

[no subject]

-date- means daily date (only). 

-time- means time of day (only). 

-time- has values of the form "hh:mm:ss", say "01:23:45", "12:34:56",

If so, -time- will sort fine in its string form. And -sort id date time-
will do what you want. 

If not, you need some one to make a smarter guess or to give more

To get -time- into numeric form, there are various ways. For one, see
the help for -split-.  


Hugh Colaco

I have 3 variables; id, date, time.

"date" and "time" both have a storage type of str8 and are both in %9s
display format. I need to sort on "id", "date" and "time" in that

I am able to get "date" as float %td, but I am having a problem with
"time". I got "time" as a double %tc, but it obviously comes out with
the date "01jan1960" plus the time. I have over 2 million
observations. I am using Stata 10.

*   For searches and help try:

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