This is the format i need to put into form in the dd mm yy one
Try with this expression
DateTime.ParseExact(StringInput.ToString,"dd-MM-yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("yyyy-MM-dd")
Regards
Gokul
Getting this error
Hi,
Please store the output in a string variable instead DateTime variable like below code.
This will resolve the error.
Str_Var= DateTime.ParseExact(StringInput.ToString,"dd-MM-yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("yyyy-MM-dd")
Regard,
Ashutosh gupta
Can you tell us the input format ?
Regards
Gokul
Please try this
DateTime.ParseExact(StringInput.ToString,"yyyy-MM-dd",System.Globalization.CultureInfo.InvariantCulture).ToString("yyyy-MM-dd")
As per screenshot this is the input format
cheers
18-02-1998 (DD-MM-YYYY)
DateTime.ParseExact(dateOfBirth.ToString,{“dd-MM-yyyy","yyyy-MM-dd"},System.Globalization.CultureInfo.InvariantCulture,System.Globalization.DateTimeStyles.None).ToString(“dd-MM-yy”)
Regards
Sudharsan
Try with this one @Arvind_Karthigayan
DateTime.ParseExact(StringInput.ToString,"yyyy-MM-dd",System.Globalization.CultureInfo.InvariantCulture).ToString("dd-MM-yy")
Regards
Gokul
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.