Finding the date in a year if i have a given number in Python
<p>I have two integers, one represents the year and one is the number of the day in that year.
Example: 2004 and 68</p>

<p>I have to find a way to turn the 68 into 8.03.2004</p>

<p>I just started using <strong>Python</strong> and I don't really know how to use the datetime command. If anyone could give me some tips it would be nice ;)</p>

<p>You can use <code>datetime.timedelta</code> to advance from the beggining of year:</p>

<pre><code>from datetime import datetime, timedelta
# we start from day 1, not day 0, so we need to substract one day
print(datetime(2004, 1, 1) + timedelta(days=68 - 1))
# 2004-03-08 00:00:00
</code></pre>

python date datetime