Skip to content

qie.deduceDate

Signature: qie.deduceDate(value, format*)

Returns: Date parsedDate - the date value of the string value

Convert the string value to a date. This function can accept virtually any date format.

Note

The date returned will be in the timezone of the QIE server. If the value has a timezone specified, it will be converted correctly to the QIE server timezone.

Note

format is optional. When not specified, value is matched against date formats QIE recognizes.

Note

null is returned when value matches no recognized format, or matches one but value is not a valid date. Check the result before using it.

Parameters

Type Name Description Default
String value the value to be converted to a date
String format* (optional) the format to use for deducing the date

Example

var deducedDate = qie.deduceDate("Mar 4 1962");
/* OR */
deducedDate = qie.deduceDate("Mar 14 1962", "MMM d yyyy");