Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
440 views
in Technique[技术] by (71.8m points)

r - Changing date format to "%d/%m/%Y"

Would like to change the date format. My data frame is shown below and would like to change all the date formats to "%d/%m/%Y".

df:

id    bdate       wdate        ddate
1   09/09/09    12/10/09     2009-09-27
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
df$ddate <- format(as.Date(df$ddate), "%d/%m/%Y")

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...