I have a string as:- 14/Jan/20
Want to convert it into the date.
Please guide me on this. Thanks in advance…!
I have a string as:- 14/Jan/20
Want to convert it into the date.
Please guide me on this. Thanks in advance…!
Hi @Jayesh_678,
Take a Datetime Variable and use assign as shown below
Convert.ToDateTime(" 14/Jan/20")
–
Mukesh
Syntax : DateTime.ParseExact(“ur date”,“ur date format”, nothing)
As perUr given date
DateTime.ParseExact(“14/Jan/20”,“dd/MMM/yyyy”, nothing)
There are many options to do
Like
DateTime.ParseExact(“14-Jan-20”,”dd-MMM-yy”,System.Globalization.CultureInfo.InvariantCulture)
Or
CDate(“14-Jan-20”)
Or
Convert.DateTime(“14-Jan-20”)
Cheers @Jayesh_678
Thanks for quick reply.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.