If you need to derive the previous month from a known date, use this formula:
=DATE(YEAR(A1);MONTH(A1)-1;1)
This works in OpenOffice (and LibreOffice), which do not seem to have a native function to do the job, and should work in MS Office Excel as well.