I'm using python, and I get data from the server, log, so I need to parse the date and time, every day, how can I print just the date and time from this file?
fin = open("data.txt","r")
text = fin.read()
new_date_format1= datetime.datetime.strptime('%Y-%m-%d')
print('Today is:',new_date_format1)
i want for example when running my code print me the date from this file, i don't want to write the date in my code, but i want that my code search inside the file and take the date in format %Y-%m-%d
`2019-02-27 01:13:41,952 INFO [stdout] (AsyncAppender-Dispatcher-Thread-104)`
2019-02-27 03:45:20,187 INFO [stdout] (AsyncAppender-Dispatcher-Thread-104)
thanks in advance