Official Content

Converts a date-string into a date value.

Syntax

Ctod(mm/dd/yy | dd/mm/yy | yy/mm/dd)

Where:

mm/dd/yy | dd/mm/yy | yy/mm/dd
    Must be a string. It depends on the Date format in CTOD function property.

Type returned:
Date

Note: mm represents the month in 2 digits, dd represents the day in 2 digits and yy represents the year, which can be of 2 or 4 digits. In case 2 digits are used, the year limit is applied (First year of 20th century property)

Scope

Objects:  Procedure, Transaction, Web PanelPanel, Data Provider
Generators: .NET, .NET Framework, Java, Apple, Android, Angular

Sample

Event Start
    &Date=CtoD('08/21/14')   //The &Date variable is based on the Date data type
Endevent

See Also

FromString method
DtoC function
YMDtoD function
Date format in CTOD function property




Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant