Convert date format to expected format type

Hi All,
@Palaniyappan

I am reading the date from excel it will be like 06/06/2019
Actual Date format : 06-06-2019
Expected format : 06-June-2019

Thanks in advance :slight_smile:

Best Regards,
Naveen

1 Like

Yah like this
The expression would be @Naveen.Ch
str_output = DateTime.ParseExact(str_input.ToString.SubString(0,10),”dd-MM-yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd-MMMM-yyyy”)

Cheers @Naveen.Ch

1 Like

@Naveen.Ch

Try this.

 DateTime.parseexact("06-06-2019","dd-MM-yyyy",system.globalization.cultureInfo.invariantculture).Tostring("dd-MMMM-yyyy")
1 Like

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