How to convert datetime(1/21/2018 00:00:00) into date(1/21/2018)

Hello,

How to convert datetime value for ex…1/21/2018 00:00:00 to 1/21/2018.

Thanks…

1 Like

Hi,
Try the below code using assign activity

string s = dt.ToString(“dd/MM/yyyy”, CultureInfo.InvariantCulture)

Where, dt is the DateTime variable.

Thanks and regards,
Ananthu

I want date in mm/dd/yyyy format

Download zip file from link I hope it’s useful

String v1 = dt.Tostring(“MM/dd/yyyy”)

Then just try string s = dt.ToString(“MM/dd/yyyy”)

1 Like