So I’m using pyodbc to take a Date Time field from MS Access add to a Python list. When I do this, it pyodbc instantly converts the data to this format datetime.datetime(2012, 1, 1,0,0). I’m only interested in obtaining the year 2012 in this case. How can I parse the year out of my List when it uses this format? Maybe pyodbc has some syntax I could use before it evens gets into the List?
So I’m using pyodbc to take a Date Time field from MS Access add
Share
Just for the record,
datetime.datetimeis not a “list of values”, it’s a class.