我在调取企业微信的 API 时,发现写入明道云的时间字段被识别成了:1586744686E9 这种格式。
经过 Python 转换成日期格式后,即可正常写入工作表。代码如图如下:
p = input['ti']
t = p.replace('.','')
n = t.replace('E9','')
tt = int(n)
time_local = time.localtime(tt)
dt = time.strftime("%Y-%m-%d %H:%M:%S",time_local)
output = {'dt':dt}