Converting days since epoch to date
How can one convert a serial date number, representing the number of days since epoch (1970), to the corresponding date string? I have seen multiple posts showing how to go from string to date number, but I haven't been able to find any posts on how to do the reverse. For example, 15951 corresponds to "2013-09-02" . >>> import datetime >>> (datetime.datetime(2013, 9, 2) - datetime.datetime(1970,1,1)).days + 1 15951 (The + 1 because whatever generated these date numbers followed the convention that Jan 1, 1970 = 1.) TL;DR: Looking for something to do the following: >>> serial_date_to_string