반응형

  현재 년, 월, 일, 시, 분, 초 문자열로 표현하기 (yyyymmddhh24miss 형태) 

## 시간 표시  ##################################### 
import time
import datetime
now = datetime.datetime.now()
nowStr = "{:%Y%m%d%H%M%S}".format(now)
timeserise = time.time()
timeserise = str(int(timeserise))
#print(timeserise)
print(now)
print(" 년월일시분초 :" + nowStr)

#################################################
반응형

+ Recent posts