fromtimestamp
-
[ Python ] Convert datetime from Unix Time Stamp. (Unix Time Stamp를 일반 datetime 형식으로 변환)Python/Python Programming 2019. 12. 13. 09:08
Unix Time Stamp → datetime Stamp from datetime import datetime unixTimestamp = '1576118093' print(datetime.fromtimestamp(int(unixTimestamp))) ---------------------------------------------------- 2019-12-12 11:34:53 datetime Stamp → Unix Time Stamp from datetime import datetime import time today = datetime.today() print('UNIX Time : %s' %(time.mktime(today.timetuple()))) -------------------------..