> ## Content Index
> Fetch the complete content index at: https://www.vizney.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Using Date Constants in Tableau Calculated Fields
- URL: https://www.vizney.com/using-date-constants-in-tableau-calculated-fields/
- Published: 2025-05-13T02:11:55.000Z
- Updated: 2026-02-23T23:59:19.000Z
- Description: This is a method you can use when writing calculated fields that compare against a specific date.
- Author: Yehwan Hwang
- Tags: Knowledge Base

When writing calculated fields in Tableau that compare against a specific date, you need to enclose the date in `#` symbols.

```
DATEADD('day', 10, #1/20/25#) = #January 30, 2025#

DATEDIFF('day', #3/10/2025#, #3/20/2025#) = 10

DATEPART('year', #2025-05-13#) = 2025

```

Without a date literal, Tableau may interpret the value as a different data type, so be careful when using it.

[Date FunctionsDates are a common element in many data sources![](https://storage.ghost.io/c/6a/50/6a50f03c-1922-4e90-bf18-c5abd0f819d4/content/images/icon/favicon-7.ico)Tableau![](https://storage.ghost.io/c/6a/50/6a50f03c-1922-4e90-bf18-c5abd0f819d4/content/images/thumbnail/datefunc_dateformats.png)](https://help.tableau.com/current/pro/desktop/en-us/functions%5Ffunctions%5Fdate.htm?ref=vizney.com#the-date-literal-)