Python/date & time (1) 썸네일형 리스트형 날짜 구하기 # 한달 전의 날짜 구하기 1) datetime, timedelta from datetime import datetime, timedelta today = datetime.now() one_month_earlier = today - timedelta(days=30) print(one_month_earlier) 결과값: 2022-11-30 22:56:51.045597 2) datetime, relativedelta(from dateutil) from datetime import datetime # pip install python-dateutil from dateutil.relativedelta import relativedelta today = datetime.now() one_month_earlier = today + relat.. 이전 1 다음