Difference between revisions of "DTOA()"

From Lianjapedia
Jump to: navigation, search
(Created page with "''Under Construction'' Category:Lianja v5.0")
 
Line 1: Line 1:
''Under Construction''
+
==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()]], [[DTOV()]], [[ELAPTIME()]], [[EMPTY()]], [[EPOCH()]], [[GOMONTH()]], [[HOUR()]], [[HOURS()]], [[LTOS()]], [[MDY()]], [[MINUTE()]], [[MINUTES()]], [[MONTH()]], [[MTOD()]], [[MTOS()]], [[QUARTER()]], [[SEC()]], [[SECONDS()]], [[SECS()]], [[SET CENTURY]], [[SET DATE]], [[SET EPOCH]], [[SET HOURS]], [[SET MARK]], [[SET SECONDS]], [[STOD()]], [[STR()]], [[TIME()]], [[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==
 +
<code lang="recital">
 +
? 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
 +
</code>
 +
 
 +
[[Category:Documentation]]
 +
[[Category:Functions]]
 +
[[Category:Formatting Functions]]
 +
[[Category:Date and Time Data Functions]]
 +
[[Category:Lianja VFP Extensions]]
 +
[[Category:VFP Function Extensions]]
 +
 
  
 
[[Category:Lianja v5.0]]
 
[[Category:Lianja v5.0]]

Revision as of 10:46, 7 October 2019

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(), DTOV(), ELAPTIME(), EMPTY(), EPOCH(), GOMONTH(), HOUR(), HOURS(), LTOS(), MDY(), MINUTE(), MINUTES(), MONTH(), MTOD(), MTOS(), QUARTER(), SEC(), SECONDS(), SECS(), SET CENTURY, SET DATE, SET EPOCH, SET HOURS, SET MARK, SET SECONDS, STOD(), STR(), TIME(), 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