Python3 - 시간 스탬프 날짜

2760 단어 Python3
import pymongo
import time
from bson.int64 import long

#   -  
inPath = 'D:/projectData/EcSystem/Amazon/ratings.csv'
inFile = open(inPath, 'r', encoding='UTF-8')

for line in inFile:
    #  
    line = line.strip('
'
) arr = line.split(',') try: time01 = time.localtime(long(arr[3])) time02 = time.strftime("%Y-%m-%d", time01) print(time02) except: print(line) inFile.close()

좋은 웹페이지 즐겨찾기