Date and time
The value for this input datatype will be available in the session object in the following format:
Attribute Name | Datatype | Description |
Meta | map | Date & Time Meta (A) |
Value | map | The details of the date and time: 1.Date and time - ex: 2020-12-31T18:45 2. Time zone - ex: Asia/Calcutta |
Attribute Name | Datatype | Description |
Type | String | 'datetime' |
value | String | 1. date_time - 2020-12-31T18:45 2. time_zone_id - Asia/Calcutta |
Sample Code:
Format received in input "session" object:
Copied{
"meta":{
"type":"datetime",
"value":{
"date_time":"2020-12-31T18:45",
"time_zone_id":"Asia/Calcutta"
}
},
"value":{
"date_time":"2020-12-31T18:45",
"time_zone_id":"Asia/Calcutta"
}
}
Format to be returned in response object:
Copiedresponse=map();
response.put('datetime' , {
"date_time":"2020-12-31T18:45",
"time_zone_id":"Asia/Calcutta"
});
return response;