data management

When writing reports I’ve often come across the need to find the unix timestamp beginning and end of a day. Here is a Python snippet that does just that. yesterday = - datetime.timedelta(days = 1) yesterday_beginning = datetime.datetime(yesterday.year, yesterday.month,,0,0,0,0) yesterday_beginning_time = int(time.mktime(yesterday_beginning.timetuple())) yesterday_end = datetime.datetime(yesterday.year, yesterday.month,,23,59,59,999) yesterday_end_time […]

Finding yesterday’s beginning and ending unix timestamp