NLog time formatting

后端 未结 3 1102
一整个雨季
一整个雨季 2021-02-06 21:10

How do I write a layout for NLog that outputs time with milliseconds like this 11:32:08:123? I use ${date:format=yyyy-MM-dd HH\\:mm\\:ss} but I need mo

3条回答
  •  天命终不由人
    2021-02-06 21:44

    Another alternative solution is to use the ISO 8601 format '1998-02-23T14:23:05.555'. This format is independet of the languange of the sql server.

    ${date:format=yyyy-MM-ddTHH\:mm\:ss.fff}
    

提交回复
热议问题