반응형
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 |
Tags
- Java
- Tkinter
- gas
- hive
- Github
- list
- SQL
- dataframe
- Google Spreadsheet
- Excel
- google apps script
- 파이썬
- PostgreSQL
- math
- PANDAS
- Python
- Presto
- PySpark
- array
- Google Excel
- Apache
- numpy
- c#
- matplotlib
- string
- Kotlin
- GIT
- Redshift
- django
Archives
- Today
- Total
목록timedelta (1)
달나라 노트
Python datetime : timedelta(시간 또는 날짜의 차이)
datetime class의 timedelta method는 특정한 시간의 양을 저장하며 이를 이용하여 어떤 시점으로부터 얼마만큼의 시간이 양이 차이났을 때 과연 어느 시점으로 변할지를 계산합니다. 아래 예시를 봅시다. import datetime d1 = datetime.date(year = 2020, month = 1, day = 1) d2 = datetime.date(year = 2020, month = 1, day = 10) d3 = d2 - d1 print(d3) d4 = datetime.datetime(2020, 1, 1, 0, 10, 20) d5 = datetime.datetime(2020, 1, 10, 10, 10, 20) d6 = d5 - d4 print(d6) print(type(d3)..
Python/Python datetime
2020. 12. 23. 02:49