Display DateTime Up To Milliseconds - DZone

文章推薦指數: 80 %
投票人數:10人

1. Format string "ffff" is responsible for displaying milliseconds. ; 4. string myTime = DateTime.Now.ToString("yyyy.MM.dd HH:mm:ss:ffff"); ; 5. Like (1) Comment Save Tweet 16.84K Views JointheDZonecommunityandgetthefullmemberexperience. JoinForFree Formatstring"ffff"isresponsiblefordisplayingmilliseconds. stringmyTime=DateTime.Now.ToString("yyyy.MM.ddHH:mm:ss:ffff"); Console.WriteLine(myTime); Topics: OpinionsexpressedbyDZonecontributorsaretheirown. PopularonDZone UnusualJava:StackTraceExtendsThrowable CoordinatingThreadsUsingCountDownLatch GettingStartedWithKubernetesPolicyManagement,KyvernoonOpenShiftContainerPlatform IfThis,ThenThat:ConditionalLogicandDocumentGeneration Comments PartnerResources



請為這篇文章評分?