Skip to main content

Overview

The TIME data type in Oxla stores time values without any date information. It represents a specific time of day, independent of any time zone or date.

Format

The format for the TIME data type is as follows:
  • HH: One or two-digit hour (valid values from 00 to 23).
  • MM: One or two-digit minutes (valid values from 00 to 59).
  • SS: One or two-digit seconds (valid values from 00 to 59).
  • [.SSSSSS] : Optional fractional seconds, with up to six decimal places (microsecond precision).

Examples

#Case 1: Create a Schedule Table

Let’s create a table to manage employee schedules, containing their names and the time they are scheduled to start work. The TIME data type will be used for the start_time column.
The table has been successfully created after executing the above query:

#Case 2: View the Employee Schedule

To view all employee schedules in the employee_schedule table, we can use the SELECT statement.
The output will display the employee names and their corresponding scheduled start times: