标签:class 日期 time 时间 pen sql one pre begin
#!/usr/bin/env python3 import sys import os import time, datetime sys.path.append(os.getenv(‘HIVE_TASK‘)) from HiveTask import HiveTask ht = HiveTask() day_dt = ht.data_day_str buy_begin = ht.oneday(-80) buy_end = ht.oneday(-20) day_begin = ht.oneday(-5) day_end = ht.oneday(0) print (day_dt) print (buy_begin) print (buy_end) print (day_begin) print (day_end) print (‘ok‘)
打印结果:
2018-11-20 2018-09-01 2018-10-31 2018-11-15 2018-11-20
标签:class 日期 time 时间 pen sql one pre begin
原文地址:https://www.cnblogs.com/Allen-rg/p/9994284.html