python- 날짜 빼고 더하기.

BackEnd_Ash.log·2020년 9월 18일
0

파이썬

목록 보기
19/34

현재 날짜

import datetime

year  = datetime.datetime.today().year
month = datetime.datetime.today().month
day   = datetime.datetime.today().day

날짜 더하기

import datetime

year  = datetime.datetime.today().year
month = datetime.datetime.today().month
day   = datetime.datetime.today().day

today = datetime.datetime(year , month , day)
today_after_10 = today + datetime.timedelta(days=10)

날짜 빼기

import datetime

year = datetime.datetime.today().year
month = datetime.datetime.today().month
day = datetime.datetime.today().day

today = datetime.datetime(year , month , day)

today_before_10 = today + datetime.timedelta(days=10)
profile
꾸준함이란 ... ?

0개의 댓글