Python

python 获取当前年份,日,月,小时,分钟,秒

2020-07-06  本文已影响0人  凤箫之舞
import datetime from datetime
 
    def someMethod():
 
       currentSecond= datetime.now().second
       currentMinute = datetime.now().minute
       currentHour = datetime.now().hour
 
       currentDay = datetime.now().day
       currentMonth = datetime.now().month
       currentYear = datetime.now().year

datetime.now().microsecond
上一篇 下一篇

猜你喜欢

热点阅读