반응형
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
- Google Spreadsheet
- array
- Apache
- Kotlin
- Tkinter
- Excel
- gas
- c#
- PySpark
- Google Excel
- math
- GIT
- numpy
- Java
- list
- SQL
- hive
- Presto
- matplotlib
- 파이썬
- Redshift
- string
- PostgreSQL
- PANDAS
- Github
- django
- dataframe
- google apps script
- Python
Archives
- Today
- Total
달나라 노트
Hive : to_date() (timestap를 date로 변환) 본문
728x90
반응형
to_date(timestamp를 나타내는 텍스트)
to_date는 YYYY-MM-DD HH:MM:SS 이렇게 시간까지 모두 나타내있는 timestamp 형식의 string 데이터를 받아 date 부분만 반환합니다.
select to_date('2020-11-10 00:00:00');
결과 : 2020-11-10
728x90
반응형
'SQL > Apache Hive' 카테고리의 다른 글
| Hive : date_format() (날짜 format 변경) (0) | 2020.12.17 |
|---|---|
| Hive : cast() (데이터 형식 변환) (0) | 2020.12.17 |
| Hive : year(), month(), day(), quarter(), hour(), minute(), second() (날짜, 시간 요소 추출) (0) | 2020.12.17 |
| Hive : date_add(), date_sub() (특정 일 수 더하고 빼기) (0) | 2020.12.17 |
| Hive : unix_timestamp & from_unixtime (yyyymmdd 형태의 텍스트를 date type으로 바꾸기. 날짜와 unix_timestamp간의 변환) (0) | 2020.12.17 |
Comments