Mar 31, 2021 08:24 AM
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 ??
Solved! Go to Solution.
Apr 06, 2021 07:45 PM
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"
)
Apr 06, 2021 07:45 PM
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"
)
Apr 09, 2021 06:27 AM
Thanks Justin, it works perfectly !!
Apr 09, 2021 08:17 AM
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!