Error "The literal '#date#' is not a valid date" in Mac and Linux OS

Published: 22 Nov 2018
Last Modified Date: 21 Jan 2019


Published views might become blank in Tableau Server and Tableau Online running on Linux OS when using dates separated by commas. When using web-edit, the calculated field that uses date separated by commas shows that the calculation is invalid with the following error:

The literal '#date#' is not a valid date.

The issue also occurs in Tableau Desktop running on a Mac machine.



  • Tableau Online
  • Tableau Server
  • Tableau Desktop
  • Linux OS
  • Mac OS


To workaround the issue, please review the options below:

OPTION 1: Replace #date# the date function DATEPARSE(). Example:

Replace this:
IF [Order Date ]< #01,08,2018#
THEN #01,08,2018# else [Order Date]
With this:
IF [Order Date]< DATEPARSE("dd,MM,yyyy","01,08,2018")
THEN DATEPARSE("dd,MM,yyyy","01,08,2018")
ELSE[Order Date]
OPTION 2: Replace the comma by a full stop, dash, or slash. Example:

Replace this:
With this:
#01.08.2018# or #01-08-2018# or #01/08/2018#


This behavior is due to the way Mac OS interprets dates.

Additional Information

The issue does not occur in applications running on Windows OS.

Discuss this article... Feedback Forum
Did this article resolve the issue?