datetime - python get rid of default date 1900-01-01 -
i wondering if can rid of 1900-01-01 in outputs without changing of code. know there have been 1 addressing don't understand how apply lines code without changing everything. if giudance appreciate it!
import csv datetime import datetime time_difference= open('book1.csv')#it important within csv file times not have spaces before, foramtted military time , these settings saved before code ran time_difference_csv=csv.reader(time_difference) row in time_difference_csv: w = [[datetime.strptime(i[0],'%h:%m:%s')]+ [datetime.strptime(i[1],'%h:%m:%s')] in time_difference_csv] row in w: p= (row[1]-row[0]) row in w: l= (row[1]-row[0]) + row[0] td= open('121times3.csv')#imports csv list of times 1 time source; e.g. scanner times td_csv=csv.reader(td) firstline = true row in td_csv: if firstline: #skip first line firstline = false continue # parse line row in td_csv: k = [[datetime.time.strptime(i[0],'%h:%m:%s')] in td_csv] row in k:#adds difference found earlier times on csv. converts scanner times wall times. print row[0] + p
Comments
Post a Comment