parse.date: .parse.date

Description Usage Arguments Value Note See Also Examples

Description

.parse.date

Usage

1
2
.parse.date(txt, format, tz = getOption("date.reader")$tz,
  check.regex = TRUE)

Arguments

txt

character; value to convert to a POSIX date

format

character; name of the format, e.g. "MDY"

tz

character; optional time zone

check.regex

Logical; if TRUE, check syntax of txt before calling lubridate function.

Value

POSIXct object representing a date (or datetime), or NA if the input cannot be parsed.

Note

Internal function, a wrapper for lubridate functions

See Also

as.POSIXct

Examples

1
2
3
4
5
6
7
8
## Not run: 
   .parse.date( "January 11, 2014", "MDY" )
   .parse.date( "2014/02/16", "YMD" )
   .parse.date( "2014-08-05", "YMD" )
   .parse.date( "20140805", "ymd.numeric")
   .parse.date( "14/08/05", "ymd.alt")
  
## End(Not run)

decisionpatterns/date.reader documentation built on May 15, 2019, 1:55 a.m.