# datetime对象

# 对date对象获取各个时间

year 获取年 month 获取月 day 获取天 hour 小时 minute 分钟 second 秒

# datetime.now()

获取现在的时间 YYYY-mm-dd hh:mm:ss

# datetime(year,month,day,hour,minute,second)

创建一个日期时间

# datetime.strptime()

datetime.strptime( str_datetime , "%Y-%m-%d %H:%M:%S.%f" ) -> datetime 通过所给的日期时间字符串转化为datetime对象

# datetime.strftime()

datetime.strftime( datetime.date , "%Y-%m-%d %H:%M:%S.%f") 通过所给的日期时间对象转化为字符串

# timedelta对象

# timedelta(days=,hours=,seconds=)

用于创建一个timedelta对象

# 属性

days 获取天数 seconds 获取秒数 microseconds 获取微秒

# total_seconds()

用于返回已经过了多少秒,小数部分是毫秒,微秒