This procedure adds Time field into response. The time is converted from numeric format HHMMSS to ISO standard format HH:MM:SS. Additionally it is possible to pass date and time and time zone in one go. Then the response value is ISO format: YYYY-MM-DDTHH:MM:SS+HH:MM
Parameter | Type | Description | |
---|---|---|---|
element | 30A VARYING, VARSIZE | Mandatory | Name of element |
fieldName | 30A VARYING, VARSIZE | Mandatory | Field name |
time | 6P 0 | Mandatory | Numeric time value in format HH or HHMM or HHMMSS |
date | 8P 0 | Optional | Numeric data velue in format YYYYMMDD |
timeZone | 5P 0 | Optional | Numeric time shift in minutes |
The procedure returns pointer of field. If procedure can’t add field, then returns null.
Examples:
respAddTimeField('data': 'dispatchTime': OLDTIM);
respAddTimeField('data': 'dispatchTime': 124533);
//This will add to response '12:45:33'
respAddTimeField('data': 'dispatchTime': 1245);
//This will add to response '12:45:00'
respAddTimeField('data': 'dispatchTime': 12);
//This will add to response '12:00:00'
respAddTimeField('data': 'dispatchTime': 124500: 20180628);
//This will add to response '2018-06-28T12:45:00'
respAddTimeField('data': 'dispatchTime': 124500: 201806028: 180);
//This will add to response '2018-06-28T12:45:00+03:00'
respAddTimeField('data': 'dispatchTime': 124500: 201806028: -90);
//This will add to response '2018-06-28T12:45:00-01:30'