published by whitemice on Mon, 10/21/2019 - 09:36
In some effort to avoid time-zone drama, or perhaps due to fantasies of efficiency, some developer put a date-time field in a PostgreSQL database as an integer; specifically as a UNIX Time value. ¯\_(ツ)_/¯
How to present this as a normal date in a query result?
published by whitemice on Thu, 09/27/2012 - 07:00
Need a method to accurately count the number of weekdays between two days? [The key here is "accurately", it is a bit harder than it seems at first]. In Python there are several ways to do this, but most involve some iteration or list comprehension. In my opinion, if you have to do that, you are probably violating the Python idiom of "use the batteries".