FUNCTIONPublished
DToS
DToS( <dData> )Converts a date to text in YYYYMMDD format.
Overview
Returns an eight-character date representation ordered from year to day, commonly used in technical values and sortable expressions.
Syntax
DToS( <dData> )Date in sortable format
Local dStart := CTOD("08/01/2026")
Local cSqlDate := DToS(dStart)
ConOut(cSqlDate) // 20260801Expected result
The date is returned as eight characters in year, month and day order.
- Do not concatenate the result into SQL statements without proper parameterization.
- YYYYMMDD preserves chronological order when sorted as text.

Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.