excel表格vba编程的方法步骤(excel vba编程基础知识)
797
2022-05-29
文档:http://labix.org/python-dateutil
pypi: https://pypi.org/project/python-dateutil/
安装
pip install python-dateutil
1
代码示例
from datetime import datetime, date from dateutil.relativedelta import relativedelta now = datetime.now() print(now) print(now - relativedelta(months=3)) """ 2019-01-09 18:13:28.791192 2018-10-09 18:13:28.791192 """ today = date.today() print(today) print(today - relativedelta(months=3)) """ 2019-01-09 2018-10-09 """
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
参考:
python 时间处理之月份加减
Python 月份加减
Python
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。