mariadb 간단한 db function(함수) – 날짜 포맷팅

By | 6월 29, 2021

date_format() 간소화

DROP FUNCTION IF EXISTS DF14;
DELIMITER $$
CREATE FUNCTION DF14(dtm datetime)
    RETURNS VARCHAR(14)
BEGIN
    return DATE_FORMAT(dtm, '%Y%m%d%H%i%s');
END $$
DELIMITER ;
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments