UTC时间戳(毫秒)到c#中的短日期时间字符串

本文关键字:日期 时间 字符串 时间戳 毫秒 UTC | 更新日期: 2023-09-27 18:02:16

如何将UTC时间戳(毫秒)转换为c#中的短日期时间?

UTC时间戳(毫秒)到c#中的短日期时间字符串

DateTime UnixStartDate = new DateTime(1970, 1, 1);
YourDate = UnixStartDate.AddMilliseconds(YourTimestamp).ToShortDateString();