Solved
Text to date conversion
How do I convert the "Thu, 10 Nov, 2022" this text to date?
I am getting this data from IDP in text format.
How do I convert the "Thu, 10 Nov, 2022" this text to date?
I am getting this data from IDP in text format.
Hi Vijay Kumar, Please look at this code. Hope it will be helpful if the input is in the mentioned format as above.
a!localVariables(
local!months: {
"Jan",
"Feb",
"Mar",
"APR",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
},
local!splitString: ldrop(
a!forEach(
items: split(ri!input, " "),
expression: substitute(fv!item, ",", "")
),
1
),
date(
tointeger(local!splitString[3]),
wherecontains(local!splitString[2], local!months),
tointeger(local!splitString[1])
)
)Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.