date-day-func.sql 242 B

123456789101112
  1. DELIMITER //
  2. CREATE FUNCTION DateDay ( date VARCHAR(8) )
  3. RETURNS VARCHAR(10)
  4. BEGIN
  5. DECLARE ret VARCHAR(10);
  6. set ret = concat(substring(date, 1,4),'.',substring(date, 5,2),'.',substring(date, 7,2));
  7. RETURN ret;
  8. END; //
  9. DELIMITER ;