Converting time to Military

后端 未结 6 1247
清歌不尽
清歌不尽 2021-01-11 12:40

In an attempt to turn a date with a format of \"mm/dd/yyyy hh:mm:ss PM\" into military time, the following replacement of a row value does not seem to take. Eve

6条回答
  •  南方客
    南方客 (楼主)
    2021-01-11 13:12

    In C# >= 6.0 you can use string interpolation as well if you need to add something around your date. Something like:

    row["adate"] = $"S: {StartDateTime:yyyy-MM-dd HH:mm:ss}";
    

提交回复
热议问题