Date functions

Functions that handle or generate dates

A key strength of our Convert platform is its powerful date-handling capabilities. The table below lists the available date-related functions.

FUNCTIONDescription
TODAYReturns the current date as a text string
DAYReturns the day of the month as a number between 1 to 31 from a given date
MONTHReturns the month of the year as a number between 1 to 12 from a given date
YEARReturns the year component of a date as a 4-digit number
HOURReturns the hour component of a time as a number between 0-23
MINUTEExtracts the minute component of a time as a number between 0-59
SECONDReturns the second component of a time as a number between 0-59
NOWReturns the current date and time as a serial number
DATECreates a valid date from individual year, month, and day components
PARSEDATEConverts a date that is stored as a serial number to a text string
DATEVALUEConverts a date that is stored as a text string to a serial number
EDATEReturns a date (as a serial number) on the same day of the month, n months in the past or future
WEEKDAYTakes a date and returns a number between 1-7 representing the day of the week
TIMEVALUEConverts a time represented as text into a proper 'Excel time'
DATEDIFReturns the difference between two date values in years, months, or days
DAYSReturns the number of days between two dates
WORKDAYTakes a date and returns the nearest working day n days in the future or past
NETWORKDAYSCalculates the number of working days between two dates

TODAY

Returns the current date as a text string.

TODAY()
  • The function does not require any arguments.
  • The date returned is based on UTC time.
  • The returned date is formatted as a text string.

DAY

Returns the day of the month as a number between 1 and 31 from a given date.

DAY(date)
  • date: A valid date value or text string representing a date. You can also use references for date questions e.g. QA, or insert a serial date.

MONTH

Returns the month of the year as a number between 1 and 12 from a given date.

MONTH(date)
  • date: A valid date value or text string representing a date. You can also use references for date questions e.g. QA, or insert a serial date.

YEAR

Returns the year component of a date as a 4-digit number.

YEAR(date)
  • date: A valid date value or text string representing a date. You can also use references for date questions e.g. QA, or insert a serial date.

HOUR

Returns the hour component of a time as a number between 0 and 23.

HOUR(time)
  • time: A valid time value or text string representing a time. You can also use references for time questions e.g. QA.

MINUTE()

Extracts the minute component of a time as a number between 0 and 59.

MINUTE(time)
  • time: A valid time value or text string representing a time. You can also use references for time questions e.g. QA.

SECOND()

Returns the second component of a time as a number between 0 and 59.

SECOND(time)
  • time: A valid time value or text string representing a time. You can also use references for time questions e.g. QA.

NOW()

Returns the current date and time as a serial number.

NOW()
  • The function does not require any arguments.
  • The date returned is based on UTC time.
  • The returned date is formatted as a text string.

DATE()

Creates a valid date from individual year, month, and day components.

DATE(year, month, day)
  • year: A four-digit integer representing the year.
  • month: An integer representing the month (1 to 12).
  • day: An integer representing the day (1 to 31).
  • All arguments must be numeric values.
  • If the month or day values are out of their usual ranges, the function adjusts the date accordingly (e.g., month 13 advances to January of the following year).

PARSEDATE()

Converts a date that is stored as a serial number to a text string.

PARSEDATE(serial_number)
  • serial_number: A valid date serial number representing a date.
  • The serial number must correspond to a valid date in the platform's date system.
  • Returns a text string formatted as a date.

DATEVALUE()

Converts a date that is stored as a text string to a serial number.

DATEVALUE(date_text)
  • date_text: A text string representing a date. You can also use references for date-questions, such as QA.
  • If date_text is not a valid date, the function returns an error.

EDATE()

Returns a date (as a serial number) on the same day of the month, n months in the past or future.

EDATE(start_date, months)
  • start_date: A valid date value or serial number.
  • months: An integer representing the number of months to add (positive) or subtract (negative).
  • Returns a serial number representing the new date.
  • If start_date is not valid, the function returns an error.

WEEKDAY()

Takes a date and returns a number between 1 and 7 representing the day of the week.

WEEKDAY(date, [return_type])
  • date: A valid date value or serial number.
  • return_type (optional): An integer determining the numbering scheme:
    • 1 or omitted: Numbers 1 (Sunday) through 7 (Saturday).
    • 2: Numbers 1 (Monday) through 7 (Sunday).
    • 3: Numbers 0 (Monday) through 6 (Sunday).
  • Returns an integer corresponding to the day of the week.
  • If date is not valid, the function returns an error.

Related articles

Learn more about date functions in one of the following articles