Time type

Time type documentation.

Overview

This field type is designed to store a specific time of the day.

Available features

NameSupported
Many multiplicityyes
Default valuesyes
Unique flagno
Required flagyes
Indexable flagyes
Sensitive flagyes
Calculated valueyes
Automatic initializationno
Calculated initial valueno
Aggregationno
Default type rulesno
Default display optionsno

REST API

Read format

The format is a string with the format HH:mm:

"openingHours": "08:00"

Write format

You should provide a string with the format HH:mm:

"openingHours": "08:00"

JavaScript API

Read format

The val() method in the wrapper will return a string in the format HH:mm.

// this will print something like "time: 08:00"
log('time: '+record.field('openingHours').val());

Write format

You should provide a string with the format HH:mm:

record.field('openingHours').val('HH:mm');

Export/Import

Export format

The export format is HH:mm:

"timeField1","timeField2"
"20:30","10:15"

Import format

The import format is HH:mm:

"timeField1","timeField2"
"20:30","10:15"

Queries

For more information, please refer to the Query Language Documentation.

Available operators

OperatorSupported
equalsyes
notEqualsyes
emptyyes
notEmptyyes
likeno
greateryes
greaterOrEqualsyes
lessyes
lessOrEqualsyes
betweenyes
currentUserFieldno

Query formats

You should provide a string with the format HH:mm. For example:

// finds companies opening after 10:00 
var records_sample = sys.data.find('companies', {'openingHours': 'greater(10:00)'});
log('total: '+records_sample.count());
while (records_sample.hasNext()) {
    log(records_sample.next().label());
}
// finds companies opening after 10:00 
var query_sample = sys.data.createQuery('companies')
    .field('openingHours').greater('10:00')
var records_sample = sys.data.find(query_sample);
log('total: '+records_sample.count());
while (records_sample.hasNext()) {
    log(records_sample.next().label());
}
// finds companies opening after 10:00 
GET /data/contacts?openingHours=greater(10:00)

Aggregate queries

Please refer to the Aggregate Queries Documentation for more detailed information.

Available operators

OperatorSupported
sumno
avgno
firstyes
lastyes
minyes
maxyes

UI queries

Please refer to the UI Queries Documentation for more detailed information.

Matching of values

PropertyDescription
Matching operatorequals
The format is Xd Xh Xm Xs, where X represents the number of days, hours, minutes, and seconds respectively.

Available operators

OperatorSupported
Many valuesyes
Greaterno
Greater or equalsno
Lessyes
Less or equalsyes
Betweenyes