There are a lot of expressions to work with dates in GXquery. Check the links below to know more about this expressions.
Expression |
Purpose |
Example |
AddMth |
To add a specific number of months to a given date. |
AddMth(&Date,&Month) |
AddYr |
Adds a given number of years to a given date. |
AddYr(&FromDate,1) |
EoM |
To return the last date of the month in the given date parameter. |
EoM(&Today()) |
YMDHMStoT |
Returns a DateTime value representing the date and time received as parameters. |
YMDHMStoT(&Year,&Month,&Day,&HH,&MM,&SS) |
YMDtoD |
To return a date from three given numbers: year, month and day. |
YMDtoD(&YY, &MM, &DD) |
Age |
To calculate the difference, in years, between two date expressions. |
Age(&Today) |
Day |
To extract the number that indicates the day in a given date. |
Day(&Date) |
DoW |
To return the number (1...7) of the day of the week. This number is associated with a day of the week (Sunday = 1). |
DoW(&Date) |
Hour |
To return a numeric value representing the time in 24-hour format. |
Hour(&DateTime) |
Minute |
To return a numeric value representing the minutes of a datetime argument. |
Minute(&DateTime) |
Month |
To return the numeric month identifier in a given date. |
Month(&Date | &DateTime) |
Second |
To return a numeric value representing the seconds in a datetime argument. |
Second(&DateTime) |
Year |
To return the year number in a given date. |
Year(&Date | &DateTime) |
CMonth |
Returns the name of the month for the given date. |
CMonth(&Date | &DateTime) |
CDoW |
Returns the weekday for a given date. |
CDoW(&Date | &DateTime) |