Help

Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here

Dates are not recognized in spanish

Topic Labels: Dates & Timezones
Solved
Jump to Solution
375 3
cancel
Showing results for 
Search instead for 
Did you mean: 

I am using DATETIME_PARSE, but it has problems with some months in spanish, as you can see in the screenshot.
I am trying to convert those months, but I cant get the way.
Any ideas ??
Screen Shot 2021-03-31 at 10.31.17 AM

1 Solution

Accepted Solutions

A collection of nested SUBSTITUTE() functions should do the job to replace the Spanish abbreviations with their English equivalents (this sample only swaps a few; add more nested functions to cover any missing months with spelling variations):

SUBSTITUTE(
  SUBSTITUTE(
    SUBSTITUTE(
      {Fecha Vencimiento}, "ABR", "APR"
    ), "DIC", "DEC"
  ), "AGO", "AUG"
)

Wrap that inside a DATETIME_PARSE() function:

DATETIME_PARSE(
  SUBSTITUTE(
    SUBSTITUTE(
      SUBSTITUTE(
        {Fecha Vencimiento}, "ABR", "APR"
      ), "DIC", "DEC"
    ), "AGO", "AUG"
  ), "DD-MMM-YYYY"
)

Screen Shot 2021-04-06 at 7.43.04 PM

See Solution in Thread

3 Replies 3

A collection of nested SUBSTITUTE() functions should do the job to replace the Spanish abbreviations with their English equivalents (this sample only swaps a few; add more nested functions to cover any missing months with spelling variations):

SUBSTITUTE(
  SUBSTITUTE(
    SUBSTITUTE(
      {Fecha Vencimiento}, "ABR", "APR"
    ), "DIC", "DEC"
  ), "AGO", "AUG"
)

Wrap that inside a DATETIME_PARSE() function:

DATETIME_PARSE(
  SUBSTITUTE(
    SUBSTITUTE(
      SUBSTITUTE(
        {Fecha Vencimiento}, "ABR", "APR"
      ), "DIC", "DEC"
    ), "AGO", "AUG"
  ), "DD-MMM-YYYY"
)

Screen Shot 2021-04-06 at 7.43.04 PM

Thanks Justin, it works perfectly !!

Glad to know that you got the answer you were seeking! If you would, please mark my comment (the one above, not this one) as the solution to your question. This helps others who may be searching with similar questions. Thanks!