title: Converting string timestamp to Python datetime (was: how to properly convert char into float or double in Python)
body: <p>Here I have string like this <code>"1322485986.672901000"</code>, data type is string which represents unixtime. I want to convert it into datetime in Python.</p>
  
  <p>The way I used is <code>date = datetime.fromtimestamp(float(row[0]))</code> row[0] represents value like this <code>1322485986.672901000</code>, since I have several rows. The convert result is wrong, it only calculates the digits before the dot. So the date after conversion is like 2011-11-28 13:53:23.6729</p>
  
  <p>I think the problem is <code>float(row[0])</code>, but I don't know how to solve this problem, or does anyone know how to convert unixtime to datetime in a better way?</p>
  
  <p>Many thanks!</p>
  
  <p>Now the result I got is 2011-11-28 14:13:06.672901</p>
  
  <p>But when using an online converter, the result is 2011-11-28 13:13:06</p>