How to Convert Date to Character in R
Here are two ways to convert Date to Character in R: Using as.character() Using format() Method 1: Using as.character() dates <- c(“11/20/80”, “11/20/91”, “11/20/1993”, “09/10/93”) dt <- as.Date(dates, “%m/%d/%y”) strDates <- as.character(dt) strDates Output [1] “1980-11-20” “1991-11-20” “2019-11-20” “1993-09-10” Method 2: Using format() If you need to format the date in a specific way during … Read more