Display DateTime Up To Milliseconds
Join the DZone community and get the full member experience.
Join For FreeFormat string "ffff" is responsible for displaying milliseconds.
string myTime = DateTime.Now.ToString("yyyy.MM.dd HH:mm:ss:ffff");
Console.WriteLine(myTime);
Opinions expressed by DZone contributors are their own.
Comments