DATEPARSE foreign month names

Version 14

    Currently, we cannot dateparse month names that differ from our computer's language setting. See also.

    Therefore we need to work around this issue. Below are two examples on how it can be done:

     

    FIXED MONTH NAME LENGTH

     

    [datetime]   "08 Sep 2016 11:31"  ( method: 3 strings )

    DATEPARSE( "dd MM yyyy hh:mm",

    LEFT([datetime],3) +

    CASE MID([datetime],4,3)

    WHEN "Jan" THEN "01"

    WHEN "Feb" THEN "02"

    WHEN "Mar" THEN "03"

    WHEN "Apr" THEN "04"

    WHEN "May" THEN "05"

    WHEN "Jun" THEN "06"

    WHEN "Jul" THEN "07"

    WHEN "Aug" THEN "08"

    WHEN "Sep" THEN "09"

    WHEN "Oct" THEN "10"

    WHEN "Nov" THEN "11"

    WHEN "Dec" THEN "12"

    END +

    RIGHT([datetime],11)

    )

     

    VARIABLE MONTH NAME LENGTH

     

    [date]  "September 2016"  ( method: 12 replace calls )

    DATE( DATEPARSE( "MM yyyy",

    replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace( [date],

    "January"   ,  "01"  ),

    "February"  ,  "02"  ),

    "March"     ,  "03"  ),

    "April"     ,  "04"  ),

    "May"       ,  "05"  ),

    "June"      ,  "06"  ),

    "July"      ,  "07"  ),

    "August"    ,  "08"  ),

    "September" ,  "09"  ),

    "October"   ,  "10"  ),

    "November"  ,  "11"  ),

    "December"  ,  "12"  )

    ) )

     

    It would be better if Tableau had built-in support of language and therefore recommend you to up-vote:

     

    Make locale work for functions in a calculated field (13)