Learn R Programming

PWFSLSmoke (version 1.0.20)

parseDatetime: Parse Datetime Strings

Description

8-, 10-, 12- and 14-digit formats are understood, e.g: 20150721 to 20150721000000. Integers will be converted to character before parsing. All incoming dates will be interpreted in the specified timezone ("UTC" by default).

If datetime is a POSIXct it will be returned unmodified.

Usage

parseDatetime(datetime, timezone = "UTC")

Arguments

datetime

vector of character or integer datetimes in YYYYMMDD[HHMMSS] format (or POSIXct)

timezone

Olson timezone at the location of interest

Value

POSIXct datetimes.

Examples

Run this code
# NOT RUN {
starttime <- parseDatetime(2015080718,timezone = "America/Los_Angeles")
# }

Run the code above in your browser using DataLab