I'm having some trouble getting the following string converted to a datetime object using Python. I have a large csv file (over 10k lines) and I need to transform a column of dates from the following format:
Jun 1, 2020 12:11:49 AM PDT
to:
06/01/20
My first thought was to use datetime.strptime, which requires passing in the string and the date format it is in, because then I can just reformat one date type to another real easy. The problem I'm having is I don't know how to represent this string as a date format, mostly due to the timezone.
My best guess for the date format I need is '%mmm %dd, %yyyy %H:%M:%S %aa' but I can't figure out how to represent the timezone here (and I'm also not sure about AM/PM being %aa).
I've tried looking at other threads but they all seem to have easily match-able strings.
Thanks!