Hi Team
Convert my input string format to date format
Input : 26th of September, 2024
Output : Sep 26, 2024
thanks
shaik
Hi Team
Convert my input string format to date format
Input : 26th of September, 2024
Output : Sep 26, 2024
thanks
shaik
Try this way,
variable string Inputdate = "26th of September, 2024"
variable string Inputdate = Inputdate.Replace("th","").Replace("st", "").Replace("nd", "").Replace("rd", "").Replace(" of","")
variable datetime Output = DateTime.ParseExact(Inputdate.ToString.Trim,"dd MMMM, yyyy",System.Globalization.CultureInfo.InvariantCulture)
Output.ToString(“MMM dd, yyyy”) → Sep 26, 2024

Regards,
Gowtham K
Thank you @Gowtham_K115
Regards
Shaik
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.