C# date formatting results in previous day

  • Thread starter Thread starter kapil kumar velpuri
  • Start date Start date
K

kapil kumar velpuri

Guest
Hi All,<o:p></o:p>

Hope everybody is doing good.<o:p></o:p>

why below logic returns previous day(08/05/2019)

string date="2019-08-06T00:00:00.000Z"
date=Convert.ToDateTime(date).ToString("MM/dd/yyyy");


It works when i use below logic

Convert.ToDateTime(date).ToUniversalTime().ToString("MM/dd/yyyy");

the "Z" means universal time but which doesn't has any time, can you please let me know the cause.

My servers are in the EST time zone

Thank you in advance for your help.

Regards,

Kapil.

Continue reading...
 
Back
Top