title: Python date reading from a csv file
body: <p>I'm actually trying to calculate a SLA from a csv file in python 2.7.8.
  here's an example of my csv file:</p>
  
  <pre><code>2014-09-24 23:57:43;0000B169;20
  2014-09-24 23:58:05;00012223;20
  2014-09-24 23:58:49;00012200;20
  2014-09-24 23:59:33;0000B0EA;21
  2014-09-25 00:00:17;000121FF;21
  2014-09-25 00:00:39;00012217;21
  2014-09-25 00:01:01;00012176;20
  2014-09-25 00:01:23;00012175;20
  </code></pre>
  
  <p>As you can see there are two different days on my CSV file and I want my program to read them and calculate the SLA daily.
  here's my program:</p>
  
  <pre><code>#V1.1 du programme de Calcul du SLA
  import csv
  import datetime
  with open("/home/maxime/Bureau/Dev/Exports/export2.csv", 'rb') as f:            #import the required modules
      reader = csv.reader(f, delimiter=';')
      count=0              #variable of the date "number"
      for row in reader:
      if row[0] !="Dispatch date":                # we don't want to include the first line of the first column
          date = datetime.datetime.strptime (row [0],"%Y-%m-%d %H:%M:%S")             #creating the datetime object with the string agrument
          if date &lt; datetime.datetime.strptime ("2014-09-26 00:00:00", "%Y-%m-%d %H:%M:%S")and date &gt; datetime.datetime.strptime ("2014-09-25 00:00:00", "%Y-%m-%d %H:%M:%S"):        #loop to calcul if the date is correct or not
          count = count+1                 #increment the date to perform the SLA calcul
      result = (count/3927.2)*100                 #SLA calcul
      print "Le fichier date du", date                #
      print "Le SLA est de :", result, "%"            #Display the SLA and the date of the file
  </code></pre>
  
  <p>I don't know how to use correctly the "datetime" function in python so could you help me to resolve my problem.</p>