Choose where you’d like to start

Time data type

Table of Contents

Overview

The time datatype represents time values in both 12-hour and 24-hour formats. This data type works independently of a date value.

Note:

  • Time data type is currently supported only in Zoho Creator.
  • Time values must be enclosed within single quotes.
  • Time values range between '12:00:00 AM' to '11:59:59 PM' for 12-hour format.
  • Time values range between '00:00:00' to '23:59:59' for 24-hour format.
  • A time value should be defined with all the three components - hours, minutes and seconds in place (AM/PM in case of 12-hour format).

Example

 available_from  =  '19:00:00';
 closing_at  =  '06:00:00 PM';

Supported Time formats

  • hh:mm:ss a (12-hour format)
  • HH:mm:ss (24-hour format)

Note:

  • Declared time values cannot skip either the seconds part or seconds and minutes parts altogether. In the event the value does not conform to the supported time formats, an error message will be thrown.
  • However time values without the seconds (hh:mm or HH:mm) or without the minutes and seconds (hh or HH) part assigned to TIME fields will be accepted by defaulting the missing components. For example, "10 AM" assigned to a TIME field will be treated as '10:00:00 AM' and "18:15" will be treated as "18:15:00".
  • Care should be exercised while declaring a value like "15 minutes and 12 seconds". Declaring this value as "15:12" would be read as "15:12:00". It should be declared as "00:15:12" and "10 seconds" should be declared like "00:00:10".
  • TIME values in no way should fall outside the 24 hour range. A value declared like "23:59:60" would throw an error.
  • Operations (like addHour, subMinutes) on TIME values which result in a value outside the 24-hour range will also result in an error
  • See date time functions to find the built-in functions applicable to time data type.
  • See Zoho Creator fields to know which Zoho Creator field types are of time data type.

Get Started Now

Execute