Summary
A broad overview of the options available to convert between strings and the two time data types was given in this chapter. The strptime
command is used to convert a string into a POSIXlt
variable. The strftime
command is used to convert a time data type into a string. Finally, the basic operators used to perform arithmetic operations between two time variables was discussed, with an emphasis on using the difftime
command. We also explored the use of the difftime
data type.