>> Home >> Products >> Stata 10 >> Time/date variables

This page contains only historical information and is not about the current release of Stata. Please see our Stata 14 page for information on the current version of Stata.

Order Stata

Time/date variables

Stata already had date variables; now it has time variables (and time-and-date variables, too). Time is recorded with up to millisecond resolution, which will be important for some. Also, Stata’s time variables will work with or without leap-second adjustment. You may never have heard about leap seconds, but there are clocks that are adjusted for them, and clocks that are not, and in computer-generated datasets, time stamps come both ways. Stata can work with either one.

You can now record values like 25jun2007, or 13:42:41.106, or 25jun2007 13:42:41.106.

Stata 10 has functions that make it easy to input date, time, and date-time variables, so you can read data recorded as June 25, 2007 1:42 p.m., or 6/25/07 13:42, or 250620071342106, or Mon Jun 25 13:42:41 CDT 2007.

Stata 10 has formats that let you display date, time, and date-time variables any way you want, including any of the above, and lots more.

To see more details, click here.

Back to highlights

The Stata Blog: Not Elsewhere Classified Find us on Facebook Follow us on Twitter LinkedIn Google+ Watch us on YouTube