date-month-func.sql 239 B

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