KNOWLEDGE BASE

Date Calculated Fields Return Nulls After Extract Refresh


Published: 18 Nov 2013
Last Modified Date: 06 Nov 2017

Issue

After you refresh a MySQL extract that includes date calculated fields, the calculated fields might produce null values.

Environment

  • Tableau Desktop
  • MySQL

Resolution

Option 1

Upgrade to Tableau Desktop 10.4 or newer.
Note: The original calculation will still return NULL on a live connection

Option 2

Modify the formula to use the following date format: YYYY/MM/DD.

For example:
 
DATETIME( "1969/12/31 "+ 
STR(DATEPART('hour', [<DateTime Field>]))
+
":"
+
STR(DATEPART('minute', [<DateTime Field>])) 
+
":00"
)

 

Cause

MySQL expects a date format of YYYY/MM/DD. 

 
Did this article resolve the issue?