convert date to words

MySQL Function to Convert Date To Words

Recently I saw a MySQL Stored Function requirement on Experts-Exchange for converting date into some specific words format. You may find MySQL function for date to words conversion online; even udfs might be ready, but I decided to write my own. I wrote this simple function mainly based on SELECT CASE to convert dates in to words as follows: mysql>SELECT date_to_words(‘2010-05-08’); Eighth Day of May Two Thousand Ten Download sql file below the code. DELIMITER $$ DROP FUNCTION IF EXISTS `date_to_words` $$ CREATE FUNCTION `date_to_words` (mydate DATE) RETURNS VARCHAR(100) DETERMINISTIC BEGIN /* Converts date into words */ DECLARE yr INT;...