Date & Time Custom Functions

These custom functions are primarily related to date and time values.
DAYS_TO_XMAS
You can use this function to determine the number of days until Christmas.
FIRST_DAY
There is a LAST_DAY( ) function for determining the last day of the month for a given date, but not one for the first day. This function returns the date for the first day of the month given.
DAYS_TO
You can use this function to determine the number of days until a given date.
ITAL_DAYNAME
This function will return the name of the day of the week for a given date in a foreign language.
DAYS_TO_YEAR_END
You can use this function to determine the number of days until the end of the year.
LAST_QTR[_YR]
This function returns the quarter number (i.e., 1, 2, 3, or 4) for the previous quarter.