How to get first/last day of the previous month?
carsten.haese at gmail.com
Tue Jan 20 16:04:00 CET 2009
Hussein B wrote:
> I'm creating a report that is supposed to harvest the data for the
> previous month.
> So I need a way to get the first day and the last day of the previous
In order to not deprive you of the sense of accomplishment from figuring
things out for yourself, I'll give you a couple of hints instead of
fully formed Python code:
1) Think about how you can find the first day of the *current* month.
2) Think about how you can get to the last day of the previous month
3) Think about how you can get to the first day of the previous month
Hope this helps,
More information about the Python-list