DTOA()
Contents
Purpose
Function to perform date to ISO 8601 string conversion
Syntax
DTOA(<expD> | <expT>)
See Also
AMPM(), CDOW(), CMONTH(), CTOD(), CTOT(), DATE(), DATETIME(), DAY(), DAYS(), DMY(), DOW(), DTOC(), DTOM(), DTOS(), DTOT(), DTOV(), ELAPTIME(), EMPTY(), EPOCH(), GOMONTH(), HOUR(), HOURS(), ISLEAPYEAR(), LEAPYEARS(), LTOS(), MDY(), MINUTE(), MINUTES(), MONTH(), MTOD(), MTOS(), QUARTER(), SEC(), SECONDS(), SECS(), SET CENTURY, SET DATE, SET EPOCH, SET HOURS, SET MARK, SET SECONDS, STOD(), STOT(), STR(), STRFTIME(), TIME(), TIMEOFDAY(), TIMESTAMP(), TSTRING(), TTOC(), TTOD(), TYPE(), VAL(), VALIDTIME(), VTOD(), WEEK(), YEAR()
Description
The DTOA() function converts the date expression <expD> to a character string in the format "YYYY-MM-DD". If a datetime expression (<expT>) is specified, it is converted to a character string in the format "YYYY-MM-DD hh:mm:ss". This function is particularly useful when converting dates to pass values to JavaScript functions.
Example
? dtoa({02/28/2019}) 2019-02-28 ? dtoa({02/29/2019 11:18:54 PM}) 2019-02-28 23:18:54 store dtoa({02/28/2019})to m_date ? m_date 2019-02-28 ? type("m_date") C