CitectVBA Programming Reference > Understanding CitectVBA Language Basics > Date and Time Handling > Time-values

Time-values

A time-value in CitectVBA represents the fractional time of day since the previous midnight. Unlike a date-value which is simply a count of the number of days, the time-value is a decimal fraction of a day.

As every day invariably consists of 24 hours, or 1440 minutes, or 86,400 seconds, the time of day can be readily determined from a time-value using simple math. An hour has the time-value of one twenty-fourth of one day (0.0416'), one minute has the time-value of 0.000694', and a second has the time-value of 0.000011574'0'7'. Midday has the time-value of 0.50. 1AM has the time-value of 0.0416'. 1PM has the time value of 0.5416'.

The pre-defined CitectVBA Hour function, Minute function, and Second function calculates and returns the appropriate hour, minute or second value (as an integer) from a time-value.

See Also

Date Handling

Date Constants

Formatting Date Values

Dates in Databases Using Different Calendars

Date and Time Data Constraints