-1
我如何轉換的時間在1900年之前進入millisecond.currently使用這種方法: -將1900年前的時間轉換爲毫秒python?
if 'dob' in json_data['data']:
datetimestring = str(datetime.fromtimestamp(json_data['data']['dob']/1000.0).strftime("%d-%m-%Y"))
else:
datetimestring = []
result_data_for_editing = json_data['data']
,我gettingt此錯誤: - year=1084 is before 1900; the datetime strftime() methods require year >= 1900
你想從何時開始計數? – TZHX
實際上,在我的數據庫中有一個dob feild,conatin 1084作爲dob,我不知道如何將它轉換爲毫秒 –