converting a date field from an integer or a string to a date: Tableau Quickvids

Опубликовано: 04 Ноябрь 2024
на канале: Tableau Brent
9,028
14

**won't be needed in future versions (Tableau will automatically convert/ Video done in 9.1)

To convert integer use the following formula:
dateadd('day', int([Date]%100)-1,

(dateadd('month', int(([Date]%10000)/100)-1,

dateadd('year', int([Date]/10000)-1000,#1000-01-01#))))

For a string, use the following:
date(mid([DATE],5,2) + "/" + right([DATE],2) + "/" + left([DATE],4))