Tuesday, December 17, 2013

R - strftime() vs. strptime()

I'm learning how to handle date and time data in R.

There are two functions that are similar when converting date/time related data.

strptime() takes a character vector (string) and converts to a POSIXlt or POSIXct data object.

strftime() takes a a POSIXlt or POSIXct data object and converts to a character vector (string).

Here is documentation on use including formatting characters: http://www.inside-r.org/r-doc/base/strftime

No comments:

Post a Comment