Hi all,
I want to convert the dates like 11/02/2002 and 24/04/1993 (Indian format) to USA format like 02/24/1993 and 04/24/1993.
Please someone help me.
@Palaniyappan
@ppr
@nikhil.girish
@lakshman
@Sudharsan_Ka
@geetishree.rao
Thanks
Hi all,
I want to convert the dates like 11/02/2002 and 24/04/1993 (Indian format) to USA format like 02/24/1993 and 04/24/1993.
Please someone help me.
@Palaniyappan
@ppr
@nikhil.girish
@lakshman
@Sudharsan_Ka
@geetishree.rao
Thanks
Hi @HeartCatcher ,
That can be easily achieved by using the DateTime.ParseExact method like so →
DateTime.ParseExact(str_date,"dd/MM/yyyy",Nothing).ToString("MM/dd/yyyy")
Kind Regards,
Ashwin A.K
Yes month first
Hi,
FYI, another solution:
yourString = "24/04/1993"
Then
System.Text.RegularExpressions.Regex.Replace(yourString,"(\d{2})/(\d{2})","$2/$1")
Regards,
if you want month first then here you go
DateTime.ParseExact(your variable,"dd/MM/yyyy",Nothing).ToString("MM/dd/yyyy")
so this helps you in getting the desired output
if at all you need year first and next month kindly change last part accordingly
Cheers!!
happy automation
if you dont have any queries on this
kinldy close the topic @HeartCatcher
Happy Learning @HeartCatcher
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.