*! version 1.0.0 21 Apr 2026

Title

whattime -- Convert a minute-of-day value into clock time

Syntax

whattime minute, dst(string)

minute minute-of-day value to be converted

dst(string) diary start time, written as HH:MM; required

Description

whattime converts a minute-of-day value into a readable clock time such as 18:30 or 07:45.

This is useful when working with timing variables such as start, end, start1, or start_last, which are often stored as minutes relative to the start of the diary.

The displayed clock time depends on the diary start time given in dst().

Arguments

minute is the minute-of-day value to convert.

dst(string) specifies the diary start time, written in HH:MM format.

Important note on dst()

In this command, dst() must be written as a clock string, for example:

dst(04:00)

dst(00:00)

This differs from several other commands in the toolkit, where diary start time is given as an integer hour such as dst(4).

Be careful: writing dst(4) here is not the same thing and may lead to errors.

How the command works

whattime adds the supplied minute value to the diary start time and displays the corresponding clock time.

This makes it easy to interpret minute-based timing variables in familiar clock notation.

Examples

Example 1: Convert a minute value in a diary starting at 04:00

. whattime 870, dst(04:00)

This displays the clock time corresponding to minute 870 in a diary that starts at 04:00.

Example 2: Convert midnight-based minute values

. whattime 90, dst(00:00)

This displays the clock time corresponding to 90 minutes after midnight.

Remarks

1. Use the same diary start convention as the source data

To interpret a minute value correctly, dst() must match the diary design used when the minute variable was created.

2. Useful for interpretation

This command is especially helpful when reading outputs from episode-based or diary-level timing variables.

3. Companion command

Use whatmin for the reverse operation: converting a clock time into minute-of-day format.

Stored results

whattime does not store results in r() or e(). It displays the converted clock time in the Results window.

Author

Juana Lamote de Grignon-Pérez

Centre for Time Use Research (CTUR)

Also see

whatmin for converting clock times into minute-of-day values.