I\'m currently writing some reporting code that allows users to optionally specify a date range. The way it works (simplified), is:
today = datetime.date.today() begintime = today.strftime("%Y-%m-%d 00:00:00") endtime = today.strftime("%Y-%m-%d 23:59:59")