date-month-func.sql 218 B

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