Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

Changing datetime format

$
0
0

@ASHISH_17 wrote:

I am constantly getting a ValueError that date time format doesn’t match.
I want all the date values to change into the format of YYYY-MM-DD.
As there are some values in the format of DD/MM/YYYY.

And after running the code I get such values -
0 2016-01-01
1 2016-02-01
2 2016-03-01
3 2016-04-01
4 2016-05-01
5 2016-06-01
6 2016-07-01
7 2016-08-01
8 2016-09-01
9 2016-10-01
10 2016-11-01
11 2016-12-01
12 2016-01-13
13 2016-01-14
14 2016-01-15
15 2016-01-16

I have tried using pd.to_datetime and dt.strftime

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles