r - POSIXct back to character, specific format -


lets have character vector of like:

vec <- "1/1/2000" 

at pont turn date via

newvec <- as.posixct("1/1/2000", format = "%d/%m/%y") 

now let want make character again can do:

as.character(newvec) [1] "2000-01-01" 

the new format y-m-d. how can turn newvec "1/1/2000" ?

like this:

as.character(newvec,'%d/%m/%y') # [1] "01/01/2000" 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -