The eLink API relies heavily on standardised formats for some arguments, the following outlines how arguments should be encoded.
DateTime
When uploading as a datetime value any of the following formats can be used.
Full date/time with english alphabetic month abbreviations
DD-MMM-YYYY HH:MM:SS
Example
- 13-Mar-2021 15:43:44
C or C++
This format can be produced using the pattern string %d-%b-%Y %H:%M:%S
Date and time specified in a pipe seperated list.
YYYY|MM|DD|HH|MM|SS
Janurary is "01". Years must be fully specified, not abbreviated to 2 digits. Leading zeros are optional in each individual value.
Example
- 2021|03|13|15|43|44
- 2021|3|13|15|43|44
Javascript
If you are using Javascript, this format can be manipulated as shown below. Keep in mind that the DATE object uses zero based months
var Str = ''; Str += Value.getFullYear(); Str += "|" + (Value.getMonth()+1); Str += "|" + Value.getDate(); Str += "|" + Value.getHours(); Str += "|" + Value.getMinutes(); Str += "|" + Value.getSeconds(); return Str;
Converting an input date from string format to Javascript Date object
if ((Value != null) && (Value != '')) && (typeof Value.split == 'function') { var ar = Value.split('|'); if (ar.length > 1) { return new Date(Number(ar[0]), Number(ar[1])-1, Number(ar[2]), Number(ar[3]), Number(ar[4]), Number(ar[5])); } }
Invalid Formats
Dates using the format DD/MM or MM/DD are forbidden and may be rejected by API calls. Using these formats
is often a prime cause of invalid information being loaded, as to understand these dates properly all systems need to be configured 100% correctly
for the locale you are expecting. Using the above acceptable date/time formats reduces the need for configuration accuracy
Example (Invalid)
- 4/5/18 9:9:9
- 5-3-2021 15:43:44
- 13-3-2021 15:43:44 (While this is clear what the date is intended to be, it is still considered invalid)