This procedure adds Date field into response. The date is converted from numeric format YYYYMMDD to ISO standard format YYYY-MM-DD. 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 |
date | 8P 0 | Mandatory | Numeric data velue in format YYYYMMDD |
time | 6P 0 | Optional | Numeric time value in format HH or HHMM or HHMMSS |
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:
respAddDateField('data': 'dispatchDate': OLDTIM);
respAddDateField('data': 'dispatchDate': 20180628);
//This will add to response '2018-06-28'
respAddDateField('data': 'dispatchDate': 201806028: 12);
//This will add to response '2018-06-28T12:00:00'
respAddDateField('data': 'dispatchDate': 201806028: 1245: 180);
//This will add to response '2018-06-28T12:45:00+03:00'
respAddDateField('data': 'dispatchDate': 201806028: 124533: -90);
//This will add to response '2018-06-28T12:45:33-01:30'