---
title: date()
slug: grpU-date
docTags: 
createdAt: 2021-09-14T17:44:47.000Z
---

Converts a value to a [Date](docId\:xTAQdzvLBTAKjxRnpFwe9), including handling relative dates.

### Syntax

`date(value[, startingDate])`&#x20;

- `value` - the value to convert to a date. This value may be an exact date ("2025-01-01"), or in [Relative Dates](docId\:LVlFv-1A-ePBySJQJ5FJC) form ("+1w+3d")
  - If passed a [Number](docId\:ucI5tCTfVBhonEJ6ZQijg), then the number will be assumed to be a Unix Timestamp (seconds since the epoch)
- `startingDate` (optional) if passed, will use this date as the starting-point date for the relative date

### Return Type

[Date](docId\:xTAQdzvLBTAKjxRnpFwe9), or [Null](docId\:N9trVqonnBknqL9DrNBP6) if unable to parse or convert the value into a date

### Examples

`date()` returns the current date.

`date("-3m")` returns the date three months ago

`date(1744206569)` returns the date of April 9, 2025 (by converting from a unix timestamp)

`date("2025-12-25")` returns the exact date of Dec 25, 2025

`date("+6w", createDate)` returns a date six weeks from the value of `createDate`.
