I have a excel data with time stamp format like this "2019-06-10T14:05:00+05:30" [YYYY-MM-DDTHH:MM:SS], I want it to be converted into "2019-06-10 14:05" [YYYY-MM-DD HH:MM],

Is it possible to convert into required format using Excel or Python Libraries? or any other way?

Thank you!

  • $\begingroup$ one way is storing the data as dataset and changing the format of column date-time with string rules. $\endgroup$ Jun 24 '19 at 9:42
  • Using python's pandas library
  • strftime() helps obtain specific format
  • to_datetime() of pandas helps convert string to datetime object
import pandas as pd
dt = "2019-06-10T14:05:00+05:30"
dt = pd.to_datetime(dt, errors='ignore')
transformed_date = dt.strftime("%Y-%m-%d %H:%M")
dateType = pd.to_datetime(transformed_date)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.