DateTime removes trailing zeros from milliseconds

前端 未结 2 1096
攒了一身酷
攒了一身酷 2021-01-28 15:14

My Logger class uses DateTime to print up to millisecond accuracy to logfile, however I notice it keeps removing the training zeros which is rather annoying.

Any ideas

2条回答
  •  青春惊慌失措
    2021-01-28 15:53

    .fff. Case matters. I refer you to the excellent documentation here: https://msdn.microsoft.com/library/8kb3ffffd4

提交回复
热议问题