
Solved
How can we convert a string variable to a date?How can I fix the bug?

Best answer by divya.jain12
Hi,
Can you try running this:
to_date(<%=Year%>,FORMAT('%Y'))
But if you want to convert the whole date with month and day included, it should be:
to_date(<%=Year%>,FORMAT('%Y%m%d'))
You just have to add single quotes.
Hope this helps :)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.