date-day-func.sql 263 B

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