datestring_to_unix: Converts the given datestring into a unix-timestamp.

Description Usage Arguments Value Examples

View source: R/timeconversion.R

Description

Converts the given datestring into a unix-timestamp.

Usage

1
datestring_to_unix(datestring, in_format = "%Y-%m-%d")

Arguments

datestring

The date to convert given as a string of the specified in_format.

in_format

The format code of the given datestring. For the specification see section "Details" in help(strptime)

Value

Integer representing the date as a unix_timestamp.

Examples

1
2
3
4
      datestring_to_unix("1970-01-01")
      # 0
      datestring_to_unix("1970-01-02")
      # 86400

gi0na/adjHelpR documentation built on Jan. 9, 2022, 11:38 p.m.