반응형
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 | 29 | 30 | 31 |
Tags
- math
- Mac
- hive
- 파이썬
- Google Spreadsheet
- string
- Excel
- google apps script
- Google Excel
- numpy
- Redshift
- gas
- dataframe
- Github
- array
- PANDAS
- matplotlib
- PySpark
- SQL
- Java
- Tkinter
- list
- django
- c#
- Kotlin
- PostgreSQL
- GIT
- Apache
- Python
Archives
- Today
- Total
목록strftime (1)
달나라 노트
Python datetime : strftime(시간 날짜 데이터를 텍스트로) & strptime(텍스트를 시간 날짜 데이터로)
2020-03-08이라는 날짜를 표현하는 방식은 다양합니다. 2020-03-08이라고 표현할 수도 있으며 2020/03/08, 03/08/2020, 03-08-2020, 08-03-2020 등등 여러 구분기호(-, / etc)와 년, 월, 일의 순서를 변경할 수도 있습니다. 이번 section에서는 이와 같이 날짜, 시간 데이터를 원하는 format에 맞춰 텍스트로 전환하는 방법을 알아보겠습니다. import datetime now = datetime.datetime.now() print(now) t0 = now.strftime("&H:%M:%S") print(t0) t1 = now.strftime("&H-%M-%S") print(t1) t2 = now.strftime("%m/%d/%Y, %H:%M:%S..
Python/Python datetime
2020. 12. 23. 02:54