[Chartjs]-How can i reformat dates

2👍

Before you pass the response data into your template, you can format your dataframe, as the oanda will return the time with format 2014-02-12T14:50:25Z, you can format the df['time'] with fomat DD/MM/YY.

df['time']=pd.to_datetime(df['time']).dt.strftime('%d/%m/%Y')

After formatting, 2014-02-12T14:50:25Z will become 02/07/2014.

Leave a comment