parse_date: Parse date/time

Description Usage Arguments Examples

View source: R/utilities.R

Description

Can be used to parse dates appearing in http response headers such as Expires or Last-Modified. Automatically recognizes most common formats. If the format is known, strptime might be easier.

Usage

1
parse_date(datestring)

Arguments

datestring

a string consisting of a timestamp

Examples

1
2
3
4
# Parse dates in many formats
parse_date("Sunday, 06-Nov-94 08:49:37 GMT")
parse_date("06 Nov 1994 08:49:37")
parse_date("20040911 +0200")

Example output

[1] "1994-11-06 08:49:37 UTC"
[1] "1994-11-06 08:49:37 UTC"
[1] "2004-09-10 22:00:00 UTC"

curl documentation built on June 23, 2021, 9:07 a.m.