반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 네이버 로그인 하기
- UiPath
- 파이썬 환경설정
- 커머스API
- pywinauto 윈도우제어
- Selenium 셀렉터잡기
- 네이버부동산크롤링
- pycdc.exe
- pywinauto 윈도우
- 파이썬 네이버 로그인
- 파이썬 가상환경 설치
- 네이버매물크롤링
- uipath 입문
- Uipath 설치방법
- Element is not clickable at point
- 네이버커머스API
- 파이썬네이버부동산
- pycdas.exe
- 네이버 로그인 캡챠해결
- 왕초보 파이썬 실행
- Python
- vscode venv 설치
- venv 설치
- selenium
- 파이썬 가상환경 설치방법
- 가상환경설치
- pywinauto
- 날짜 정규식
- 네이버 로그인 영수증 해결
- Uipath 기초
Archives
- Today
- Total
콘솔워크
현재 날짜 가져오기 및 특정 일자 더하기 본문
반응형
from datetime import timedelta
# 현재 날짜
today = datetime.today()
# 현재 년도, 월, 일, 시간
current_year = datetime.today().year
current_month = datetime.today().month
current_day = datetime.today().day
current_hour = datetime.today().hour
# 어제, 내일
yesterday = datetime.today() - timedelta(1)
tomorrow = datetime.today() + timedelta(1)
# 날짜 표기 형식 변경 -> YYYY.mm.dd HH:MM:SS
today = datetime.today().strftime(f'%Y.%m.%d %H:%M:%S')
반응형
'프로그래밍 > python' 카테고리의 다른 글
dataframe contains and operation 여러 조건을 만족하는 데이터 필터링 (0) | 2022.10.05 |
---|---|
문자열에서 숫자만 가져오는 여러 방법 (0) | 2022.09.29 |
pandas.Series.str.match 특정 단어와 완전 일치하는 데이터 필터링 (0) | 2022.09.27 |
브라우저가 멈출 정도의 로딩에 빠졌을 때 파이썬이 기다려 줄 수 있는 최대 시간 설정 (selenium의 time out exception 방지) (0) | 2022.09.23 |
Decompyle++ 윈도우 exe 파일 (14) | 2022.09.20 |