SHARE
TWEET

Untitled

a guest Feb 19th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. timelimit = Operation.objects.filter(account = 3).aggregate(Max('date'))
  2. for row in csv.reader(reencode(f), delimiter=';', quotechar='"')
  3.   if row != []:
  4.     if row[0]>timelimit:
  5.       operation.date=row[0]
  6.    
  7. #this will convert your string("2012-01-12") to a datetime object
  8.  
  9.     from datetime import datetime
  10.     >>> x = datetime.strptime(row[0], "%Y-%m-%d")
  11.     >>> x
  12.     >>> datetime.datetime(2012, 1, 12, 0, 0)
  13.    
  14. timelimit = datetime(2011, 10, 10)
  15.    
  16. x > timelimit
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top