Date Macro functions
Note
For an overview, please see Dates.
- number ( date - date )
Returns the number of days between two dates.
- date ( date + number )
- date ( date - number )
Adds/subtracts a number of days to/from a date. Returns a date.
- number ( date op date )
Comparison between two dates, returning either 0 (false) or 1 (true); op is one of the boolean operators below :
> Larger Than
< Smaller Than
>= Larger or Equal
<= Smaller or Equal
= Equal
<> Not Equal
Smaller, greater, equal applied to dates refer to earlier, later, same dates.
- date addmonths ( date, number )
Returns a date whose value is the input date plus the number of months specified as the second argument.
- date date ( number )
Creates a date from a number. If the number is negative or zero, the parameter is the number of days from the current day. Otherwise, the number must represent a date in the yymmdd, yyyymmdd or Julian format. If the number is between 1721426 and 3182030 (representing the dates 0001-01-01 and 4000-01-01 respectively), it will be interpreted as a Julian date. The hour, minute and second information of the output date is lost (set to 0). Use hour() , minute() , second() to specify/restore it.
- number day ( date )
- number dow ( date )
Returns respectively the day of the month / day of week (monday is 1, sunday is 7) part of a date.
- number hour ( number )
Converts a number of hours into a number of days which can then be added to a date, e.g. to provide hour information to a date created by the date() function. Equivalent to dividing by 24.
- number hour ( date )
Returns the hour part of a date.
- number julday ( date )
- number juldate ( date )
Returns a date as Julian day and Julian date, respectively.
- number minute ( number )
Converts a number of minutes into a number of days which can then be added to a date, e.g. to provide minute information to a date created by the date() function. Equivalent to dividing by 1440.
- number minute ( date )
Returns the minute part of a date.
- number month ( date )
Returns the month part of a date.
- date now ( )
Creates a date from the current day and time.
- number number ( date,string )
Converts a date to a number according to the number date format specified as the second input argument. See the same entry in Functions and Operators on Numbers.
- number second ( number )
Converts a number of seconds into a number of days which can then be added to a date, e.g. to provide seconds information to a date created by the date() function. Equivalent to dividing by 86400.
- number second ( date )
Returns the second part of a date.
- string string ( date,string )
Converts a date to a string according to the string date format specified as the second input argument. See the same entry in String Functions.
- number year ( date )
Returns the year part of a date.
- number yymmdd ( date )
Returns a date as a 6 digit number - discards hours, minutes and seconds.
- number yyyymmdd ( date )
Returns a date as an 8 digit number - discards hours, minutes and seconds.