16 lines
318 B
MySQL
16 lines
318 B
MySQL
|
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 ;
|