일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- gas
- Kotlin
- Google Spreadsheet
- Excel
- numpy
- math
- c#
- matplotlib
- hive
- Github
- GIT
- Tkinter
- Python
- list
- Redshift
- Java
- dataframe
- PostgreSQL
- Google Excel
- 파이썬
- Mac
- SQL
- PANDAS
- PySpark
- array
- google apps script
- django
- Apache
- string
- Today
- Total
목록date (11)
달나라 노트
Presto의 date_add() 함수는 어떤 시점에 특정 시간 간격(년, 월, 일, 분기, 주, 시간, 분, 초, 밀리초)을 더하고 빼는 역할을 해줍니다. Syntax date_add(unit, value, timestamp) - unit 더할 시간 간격의 단위를 의미합니다. year -> 년 month -> 월 day -> 일 quarter -> 분기 week -> 주차 dayofweek -> 요일 hour -> 시 minute -> 분 second -> 초 millisecond -> 밀리초 - value 더할 시간 간격을 의미합니다. 더하고싶으면 양수를 쓰면 되고, 빼고 싶으면 음수를 적으면 됩니다. - timestamp value를 더할 대상이 되는 timestamp입니다. timestamp 뿐 ..
current_timestamp는 현재 시스템의 시간을 timestamp type으로 return합니다. select current_timestamp -- Result 2023-10-09 18:47:12.970000000
Presto의 date_diff() 함수는 두 시점간의 차이를 원하는 단위(e.g. 시간, 분 등)로 return합니다. Syntax date_diff(unit, start_datetime, end_datetime) - unit 두 시점간의 차이를 어떤 단위로 return할지를 결정합니다. year = 두 시점간의 차이를 년 단위로 계산합니다. month = 두 시점간의 차이를 월 단위로 계산합니다. day = 두 시점간의 차이를 일 단위로 계산합니다. hour = 두 시점간의 차이를 시간 단위로 계산합니다. minute = 두 시점간의 차이를 분 단위로 계산합니다. second = 두 시점간의 차이를 초 단위로 계산합니다. - start_datetime 시작 시점의 datetime입니다. - end_d..
Google Apps Script에서 string을 date type으로 변경하는 방법은 여러 가지가 있습니다. 오늘은 그 중 대표적인 몇가지만 알아봅시다. 1. Date 객체 사용 1 function myFunction() { var date_string = '2022-12-25'; var date = new Date(date_string); Logger.log(date); } -- Result Sun Dec 25 09:00:00 GMT+09:00 2022 첫 번째는 Date 객체를 사용하는 것입니다. - var date_string = '2022-12-25'; 위 예시를 보면 먼저 위처럼 2022-12-25라는 날짜 형태로 적힌 텍스트가 있습니다. 이건 YYYY-MM-DD라는 날짜 형태로만 적혀있을 ..