Can some help me to format this date

I have a date value from excel which is in the format of mm/dd/yyyy. I need to convert it to mm/dd/yy

Can anyone plz help me with this. I tried multiple ways, but getting an error

thanks

1 Like

Hey @shilpa_p

Date.ParseExact(CurrentRow("date").ToString, "MM/dd/yyyy", Nothing).ToString("dd/MM/yyyy")

Thanks
#nK

Hi @shilpa_p

another way

DateTime.ParseExact(Your variable,“dd/MM/yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“MM/dd/yy”)

thanks

Convert the extracted date value from Excel to datetime and then convert that back to String in the desired format.
Assuming the date value is stored in variable named - myDate
Convert.ToDateTime(myDate).ToString(“MM/dd/yy”)

Thanks

Thank you so much. This works perfect :slight_smile:

Thank You so much. I will try with this as well

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.