My data might be of different date formats (dd-mm-yyyy hh mm, yyyy-mm-dd hh mm etc) and is in string format I want to push standardized data into my database. Also I want to convert into DateTime instead of string to use it in other date-related functions. How can I do it? I tried pd.Datetime() and inserted the required format (the one I want to standardized to) but I'm getting this error :

> 
> ValueError: time data '2015-05-04 09:15:00' does not match format '%d-%m-%Y %H:%M' (match).
> 
> 
> 

I have used flask to make an upload screen and using request.files to get the csv file in my python

[![Here's how my date column looks after importing it from csv](https://i.stack.imgur.com/sHjHi.png)](https://i.stack.imgur.com/sHjHi.png)

[![Here's how it looks on excel (part1)](https://i.stack.imgur.com/qYAN2.png)](https://i.stack.imgur.com/qYAN2.png)

[![Here's how it looks on excel (part2)](https://i.stack.imgur.com/UpeWY.png)](https://i.stack.imgur.com/UpeWY.png)
Please help me with it Thanks