Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Display DateTime Up To Milliseconds

DZone's Guide to

Display DateTime Up To Milliseconds

·
Free Resource
Format string "ffff" is responsible for displaying milliseconds.


 string myTime = DateTime.Now.ToString("yyyy.MM.dd HH:mm:ss:ffff");
 Console.WriteLine(myTime);
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}