Return to Snippet

Revision: 4052
at October 19, 2007 04:27 by arunpjohny


Initial Code
CREATE OR REPLACE FUNCTION LastDateOfMonth(date) RETURNS date AS '
SELECT CAST(date_trunc(''month'', $1) + interval ''1 month''
- interval ''1 day'' as date);
' LANGUAGE sql;

Initial URL


Initial Description


Initial Title
Get the last date a given month

Initial Tags


Initial Language
SQL