What is the error message? Which database are you using? Have you checked to see what the database accepts when giving it a date string? Some accept YYYY-MM-DD format. Others may want something else. Google (or your favorite search engine) should be your friend.