decodeTime: Oce Version of as.POSIXct

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/oce.R

Description

Oce Version of as.POSIXct

Usage

1
decodeTime(time, timeFormats, tz = "UTC")

Arguments

time

Character string with an indication of the time.

timeFormats

Optional vector of time formats to use, as for as.POSIXct.

tz

Time zone.

Details

Each format in timeFormats is used in turn as the format argument to as.POSIXct, and the first that produces a non-NA result is used. If timeFormats is missing, the following formats are tried, in the stated order:

Value

A time as returned by as.POSIXct.

Author(s)

Dan Kelley

See Also

Other functions relating to time: GMTOffsetFromTz

Examples

1
2
3
4
5
6
7
decodeTime("July 1 2013 01:02:03")
decodeTime("Jul 1 2013 01:02:03")
decodeTime("1 July 2013 01:02:03")
decodeTime("1 Jul 2013 01:02:03")
decodeTime("2013-07-01 01:02:03")
decodeTime("2013/07/01 01:02:03")
decodeTime("2013/07/01")

oce documentation built on Aug. 29, 2017, 1:05 a.m.