Date data type

Official Content
This documentation is valid for:

Stores Date values.

The following table illustrates the conversion GeneXus performs according to the DBMS:

DBMS Conversion
Oracle DATE
DB2 Universal Database DATE
Informix DATE
SQL Server DATETIME
Access DBDate
DB2 for iSeries CHAR(8) or DATE1
DBF DATE(8,0)
PostgreSQL DATE

1 Depends on the value set for the Date data type definition property.

Pictures

Read about Pictures that can be applied to Date data types.


Static methods

Date.New(Year,Month,Day)

Samples

&ExpirationDate = Date.New(2018,6,10)
If &ExpirationDate >= Date.New(2022,1,4)
   msg("The date has expired")
EndIf

Consideration

When generating iOS code, controls based on the Date / DateTime data type, use the Date format property and Hour format property to infer the native styles dateStyle and timeStyle which take into account the user's preferences in the device settings.

See also

DateTime data type
Data types list