DELIMITER //
CREATE FUNCTION baggabu_dateformat(currentDate varchar(11))
RETURNS char(20)

BEGIN
DECLARE result char(20);
SET result = DATE_FORMAT(FROM_UNIXTIME(currentDate), '%Y-%m-%d');
RETURN result;
END //
DELIMITER ;


