I want to convert date like 22 september 2020 to 22/09/2020
please suggest
CDate(YourStringVar).toString("dd/MM/yyyy")
I got the error like CDate does not exist in the current context
please share with us your modeling details
i have date in excel like 22 september 2023
which i have one website in that calender format in that i just have to type the date like 22/09/2023
how to do the conversion
we had shown you the conversion and as it was done within the immediate panel it is proven, that it will work
when asking the above we do not ask for repeating the case description. We ask for e.g. a screenshot of what you have modelled.
If you are open to suggestions, here is another approach:
DateTime.ParseExact(strValue2,"dd MMMM yyyy", Globalization.CultureInfo.InvariantCulture).ToString("dd/MM/yyyy")
Here, strValue2 = 22 september 2020
Output:
Hope this helps,
Best Regards.
Thank you it works
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.