MySql
[복사가능] mysql 날짜함수 정리
administrators
2016. 9. 25. 15:05
mysql 날짜함수 정리
SELECT
NOW() as 'now날짜시간'
,DATE_FORMAT(NOW(),'%Y%m%d') as 'yyyymmdd'
,DATE_FORMAT(NOW(),'%H%i%s') as 'hh24miss'
,DATE_FORMAT(NOW(),'%p %h:%i:%s') as 'AM/PM hh:mi:ss'
,CURRENT_TIMESTAMP as 'C_T날짜시간'
,DATE_FORMAT(CURRENT_TIMESTAMP,'%Y%m%d') as 'C_Tyyyymmdd'
,DATE_FORMAT(CURRENT_TIMESTAMP,'%H%i%s') as 'C_Thh24miss'
,DATE_FORMAT(CURRENT_TIMESTAMP,'%p %h:%i:%s') as 'C_TAM/PM hh:mi:ss'
,LOCALTIME, LOCALTIME(),SYSDATE()
-- 2016.09.25 Write by 꼬마갱이
.