Time type
Time type documentation.
Overview
This field type is designed to store a specific time of the day.
Available features
Name | Supported |
---|---|
Many multiplicity | yes |
Default values | yes |
Unique flag | no |
Required flag | yes |
Indexable flag | yes |
Sensitive flag | yes |
Calculated value | yes |
Automatic initialization | no |
Calculated initial value | no |
Aggregation | no |
Default type rules | no |
Default display options | no |
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
Operator | Supported |
---|---|
equals | yes |
notEquals | yes |
empty | yes |
notEmpty | yes |
like | no |
greater | yes |
greaterOrEquals | yes |
less | yes |
lessOrEquals | yes |
between | yes |
currentUserField | no |
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
Operator | Supported |
---|---|
sum | no |
avg | no |
first | yes |
last | yes |
min | yes |
max | yes |
UI queries
Please refer to the UI Queries Documentation for more detailed information.
Matching of values
Property | Description |
---|---|
Matching operator | equals The format is Xd Xh Xm Xs , where X represents the number of days, hours, minutes, and seconds respectively. |
Available operators
Operator | Supported |
---|---|
Many values | yes |
Greater | no |
Greater or equals | no |
Less | yes |
Less or equals | yes |
Between | yes |