> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# Date functions

> Browse Sigma date functions to analyze, convert, and manipulate date and time values in formulas.

Date functions evaluate, convert, and manipulate date and time values.

| Function                                   | Description                                                                                                                 |
| :----------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------- |
| [ConvertTimezone](/docs/converttimezone)   | Converts date and time values to the specified time zone.                                                                   |
| [DateAdd](/docs/dateadd)                   | Adds a specified quantity of time to a date.                                                                                |
| [DateDiff](/docs/datediff)                 | Calculates the time difference between two dates.                                                                           |
| [DateFormat](/docs/dateformat)             | Formats a date value to text based on the format provided.                                                                  |
| [DateFromUnix](datefromunix)               | Converts a Unix timestamp to a date value.                                                                                  |
| [DateFromUnixMs](/docs/datefromunixms)     | Converts a Unix timestamp in milliseconds to a date value.                                                                  |
| [DateFromUnixUs](/docs/datefromunixus)     | Converts a Unix timestamp in microseconds to a date value.                                                                  |
| [DateLookback](/docs/datelookback)         | Returns the value of a variable at a previous point in time (or lookback period) determined by a specified date and offset. |
| [DatePart](/docs/datepart)                 | Extracts the specified date part from a date value.                                                                         |
| [DateParse](/docs/dateparse)               | Parses a text value in a specified format and returns a datetime value (date data type) in ISO format.                      |
| [DateTrunc](/docs/datetrunc)               | Truncates the date to the specified date part.                                                                              |
| [Day](/docs/day)                           | Returns the day of the month from a date value as a number.                                                                 |
| [DayOfYear](/docs/dayofyear)               | Returns the day of the year from a date value as a number.                                                                  |
| [EndOfMonth](/docs/endofmonth)             | Returns the last day of the month from a date value.                                                                        |
| [Hour](/docs/hour)                         | Returns the hour component from a date value as a number.                                                                   |
| [InDateRange](/docs/indaterange)           | Determines if a date falls within a specified date range and returns `True` or `False`.                                     |
| [InPriorDateRange](/docs/inpriordaterange) | Determines if a date falls within the date range of a prior period and returns `True` or `False`.                           |
| [LastDay](/docs/lastday)                   | Evaluates a specified component in a date value and returns the last datetime value of that component in ISO format.        |
| [MakeDate](/docs/makedate)                 | Evaluates specified values representing year, month, and day units and returns a datetime value in ISO format.              |
| [Minute](/docs/minute)                     | Returns an integer representing the minute component in a specified datetime value.                                         |
| [Month](/docs/month)                       | Returns an integer representing the month component in a specified datetime value.                                          |
| [MonthName](/docs/monthname)               | Returns the name of the month component from a specified datetime value.                                                    |
| [Now](/docs/now)                           | Returns the current date and time using your organization's account timezone.                                               |
| [Quarter](/docs/quarter)                   | Returns an integer representing the quarter component in a specified datetime value.                                        |
| [Second](/docs/second)                     | Returns an integer representing the second component in a specified datetime value.                                         |
| [Today](/docs/today)                       | Returns the current date using your organization's account timezone.                                                        |
| [Weekday](/docs/weekday)                   | Returns an integer representing the day of the week in a specified datetime value.                                          |
| [WeekdayName](/docs/weekdayname)           | Returns the name of the day of the week in a specified datetime value.                                                      |
| [Year](/docs/year)                         | Returns an integer representing the year component in a specified datetime value.                                           |