일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 파이썬
- google apps script
- gas
- Redshift
- list
- string
- Mac
- GIT
- PANDAS
- Tkinter
- dataframe
- math
- Apache
- Google Excel
- Python
- PostgreSQL
- SQL
- array
- Kotlin
- matplotlib
- PySpark
- numpy
- Github
- Google Spreadsheet
- c#
- django
- Excel
- Java
- hive
- Today
- Total
목록current_date (3)
달나라 노트
Presto에서 현재 날짜(오늘 날짜)를 얻으려면 current_date 함수를 사용하면 됩니다. select current_date; -- Result 2022-01-10
Redshift에서 현재 날짜 또는 현재 시간을 추출할 수 있는 방법을 알아봅시다. select current_date; -- Result 2021-08-25 먼저 current_date입니다. current_date는 현재 날짜를 반환해줍니다. select to_char(current_date, 'yyyymmdd'); -- Result 20210825 current_date로 반환되는 날짜의 data type은 날짜이기때문에 to_char 함수와 같이 사용할 수 있습니다. select sysdate, --> 2021-08-25 19:38:52.382610 getdate() --> 2021-08-25 19:38:52.000000 ; sysdate와 getdate 함수는 현재 날짜와 시간을 반환해줍니다. ..
current_date를 사용하면 현재 날짜를 출력할 수 있습니다. select current_date, date_format(current_date, 'yyyyMMdd'), unix_timestamp(), from_unixtime(unix_timestamp()), date_format(from_unixtime(unix_timestamp()), 'yyyyMMdd') ; -- Result 2021-08-24 20210824 위처럼 current_date는 오늘 날짜를 반환해줍니다. date_format 함수와 같이 사용해서 날짜 형식도 바꿀 수 있습니다. select date_add(current_date, -1) ; -- Result 2021-08-23 date_add 함수와 동시에 사용할 수도 있습니다..