반응형
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
- c#
- numpy
- Redshift
- array
- Java
- PANDAS
- GIT
- Google Excel
- SQL
- hive
- Mac
- PySpark
- Tkinter
- list
- gas
- Google Spreadsheet
- 파이썬
- PostgreSQL
- Apache
- string
- Github
- dataframe
- google apps script
- django
- matplotlib
- Kotlin
- Python
- Excel
- math
Archives
- Today
- Total
목록strptime (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