Change date format

Hi,

I have formate 21/02/2019 and I want to convert into 21.02.2019, Can you please tell how can I convert the date format. Thanks in advance.

Hi @balkishan,

If your date variable is “DateTime” type, you can change the format by,
Assign String, DateStr = Your_Date_Variable.ToString("dd.MM.yyyy")

If your date variable is a string, Please assign String, DateStr = Datetime.ParseExact( Your_Date_Variable.Trim,"dd/MM/yyyy",system.Globalization.CultureInfo.InvariantCulture).ToString("dd.MM.yyyy")

Warm regards,
Nimin

1 Like

Refer the below workflow

DateFormatChange (1).xaml (18.7 KB)

@balkishan. use yourVariable.Replace(“/”, “.”)

I think I have shared a working xaml in a different post for you for the same issue.