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>One way to calculate it:</p>

<pre><code>import datetime
year = 2004
day_of_year = 68
print datetime.date(year,1,1) + datetime.timedelta(days=day_of_year-1)
</code></pre>

python date datetime