728x90
반응형
CONVERT_TZ() 함수
In MySQL the CONVERT_TZ() returns a resulting value after converting a datetime value from a time zone specified as the second argument to the time zone specified as the third argument. This function returns NULL when the arguments are invalid.
CONVERT_TZ(dt, from_tz, to_tz)
예시
SELECT CONVERT_TZ('2023-07-14 08:00:00', '+09:00', '+00:00');
SELECT CONVERT_TZ('2023-07-14 08:00:00', '+00:00', '+09:00');
Reference
반응형
'[DB]DataBase > [SQL]' 카테고리의 다른 글
[SQLD] 데이터베이스 스키마 구조 (0) | 2024.02.21 |
---|---|
[SQLD] 데이터 독립성 (0) | 2024.02.20 |
[SQLD] 데이터 모델링 (0) | 2024.02.19 |
[SQL] JOIN문 (0) | 2023.04.15 |
[SQL] 집계함수(Aggregate function) (0) | 2023.04.15 |