I have an SQL DB which I am trying to extract data from. When I extract date/time values my script adds three zeros to the date/time value, like so: 2011-05-03 15:25:26.170000
Below is my code in question:
value_Time = ('SELECT TOP (4) [TimeCol] FROM [database1].[dbo].[table1]')
cursor.execute(value_Time)
for Timerow in cursor:
print(Timerow)
Time_list = [elem for elem in Timerow]
The desired result is that there is not an additional three zeros at then end of the date/time value so that I can insert it into a different database.
Values within Time_List will contain the incorrect date/time values, as well as the Timerow value.
Any help with this would be much appreciated!
TimeColcolumn?pandas dataframewithpd.read_sql(), and manipulate the data inpandas