Hello,
I'm reading data from a device - and he return to me this format
Thanks ,
I'm reading data from a device - and he return to me this format
dec/21/2021and on the prpgram I'm using this format:
2021-12-21 11:22:09,239this is what I have done:
prtint(Device_TS)
JustDate = str(StartTime).split(' ')[0]
JustDate = datetime.datetime.strptime(JustDate, '%Y-%m-%d').strftime('%M/%d/%y')
print('Just Date ', JustDate)
if JustDate not in TS1:
print('Clock Error!')
else:
print('Clock OK!')but the cut date is :dec/21/2021 11:39:57 Just Date 00/21/21 Clock Error!what is wrong?
Thanks ,
