Help

Re: Dates are not recognized in spanish

Solved
Jump to Solution
1338 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Jose_Munoz
5 - Automation Enthusiast
5 - Automation Enthusiast

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
Justin_Barrett
18 - Pluto
18 - Pluto

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
Justin_Barrett
18 - Pluto
18 - Pluto

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!