-- [VARS] SELECT -- -- @selected_year := 2012, @selected_month := 11 AS selected_month, -- -- @day_in_month :=0, -- Letzter Tag im Vormonat ermitteln @act_date := DATE_SUB(STR_TO_DATE(CONCAT_WS('-',1, @selected_month, @selected_year), '%d-%m-%Y'), INTERVAL 1 DAY)