Returns the character string corresponding to a given date.
Dtoc(date-expression)
Where:
date-expression
Is the date to be converted.
Type Returned:
Character C(8)
Objects: Procedure, Transaction, Web Panel, Panel, Data Provider
Generators: .NET, .NET Framework, Java, Ruby (up to GeneXus X Evolution 3), RPG, Visual FoxPro (up to GeneXus X Evolution 3), Cobol, Apple, Android,
Angular
Returns the String associated with the specified Date. The string “ / / “ is returned if the argument is a null Date expression.
The returned string has 2 digits for the year; to get 4 digits TtoC function has to be used.
You want to store a character string reading "Report date: 04/12/94" in the variable &String, where 04/12/94 is supposed to be the current date:
&string = concat(“Report date:”, dtoc(Today()), “ ”)
The result will be:
Report date: 04/12/94
Ctod Function
TtoC function