Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要将日期从 c# 转换为 python。数据格式为json。json中包含的数据格式为:/Date(1373338800000)。必须转换为 python 的有效日期。
看起来像毫秒的 unix 时间戳。
>>> import datetime >>> datetime.datetime.fromtimestamp(int("1373338800000") / 1000) datetime.datetime(2013, 7, 8, 20, 0)