salix/db/routines/util/functions/dayEnd.sql

16 lines
318 B
MySQL
Raw Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`dayEnd`(vDated DATE)
RETURNS datetime
DETERMINISTIC
NO SQL
BEGIN
/**
* Formats a date to the end of the day.
*
* @param vDated The date to format
* @return The formatted date
*/
RETURN TIMESTAMP(vDated, '23:59:59');
END$$
DELIMITER ;