I have extracted date as
startdate = 12-01-2024 (its a string value)
I want to convert to date variable in format (2024-01-12)
can someone help again.
I have extracted date as
startdate = 12-01-2024 (its a string value)
I want to convert to date variable in format (2024-01-12)
can someone help again.
Hi @Ellen
Try this:
startdate = "12-01-2024"
Output= Datetime.ParseExact(startdate.ToString, "dd-MM-yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString("yyyy-MM-dd")
Output DataType: System.String
Regards
Hi @Ellen
DateTime.ParseExact(Input,"dd-MM-yyyy",System.Globalization.CultureInfo.CurrentCulture).ToString("yyyy-MM-dd")
Regards,
please let us know if 12 is Month or Day
DateTime.ParseExact(StartDate, "dd-MM-yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString("yyyy-MM-dd")
OutputDAte=DateTime.ParseExact(startDate, “dd-MM-yyyy”, System.Globalization.CultureInfo.InvariantCulture).ToString(“yyyy-MM-dd”)
Import System.Globalization
Hi @Ellen
startdate = “12-01-2024”
Output=
Datetime.ParseExact(startdate.ToString, “dd-MM-yyyy”, System.Globalization.CultureInfo.InvariantCulture).ToString(“yyyy-MM-dd”)
Output = 2024-01-12
Hope it will helps you
Cheers!!
Hi ,
Use assign activity and put this on right side
Datetime.ParseExact((“12-10-2024”).ToString, “dd-MM-yyyy”, System.Globalization.CultureInfo.InvariantCulture).ToString(“yyyy-MM-dd”)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.