On Apr 24, 2015 7:45 AM, "Vincent Davis" <vinc...@vincentdavis.net> wrote:
>
> How does one get the date given the day of a year.
>
> >>> dt.datetime.now().timetuple().tm_yday
>
> 114
>
> How would I get the Date of the 114 day of 2014?

You could use a timedelta:

>>> dt.date(2014, 1, 1) + dt.timedelta(114 - 1)
datetime.date(2014, 4, 24)
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to