<div dir="ltr">thanks Fredrik, yeah it works !!!<br><br><div class="gmail_quote">On Mon, Sep 8, 2008 at 8:11 PM, Fredrik Lundh <span dir="ltr"><<a href="mailto:fredrik@pythonware.com">fredrik@pythonware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">abhilash pp wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I don't know if this question will fit on this section,<br>
any way my query is , i have used one script demork.py to extract details from Firefox history.dat file<br>
and now the problem is how to convert the TIMESTAMP given by that to normal date and time.<br>
example timestams are like this,<br>
<br>
1202919771609375<br>
1213874676203125<br>
1215693263859375<br>
<br>
i have used datetime module for this but it gave me error<br>
</blockquote>
<br></div>
a quick googling indicates that the file contains microseconds, not seconds.  dividing by 1e6 should do the trick:<br>
<br>
>>> t = 1202919771609375<br>
>>> datetime.datetime.fromtimestamp(t / 1e6)<br>
datetime.datetime(2008, 2, 13, 17, 22, 51, 609375)<br>
<br>
</F><br><font color="#888888">
<br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></blockquote></div><br></div>