dayhr.fn: Standardizes date-time input

View source: R/dayhr.fn.R

dayhr.fnR Documentation

Standardizes date-time input

Description

This function converts date and time into a "yyyy-mm-dd hh:mm:ss" format.

Usage

dayhr.fn(x, secs = T, AMPM = F)

Arguments

x

Character vector of date-time values currently accepted as input formats

"m/d/Y I:M:S p"

AM/PM

"Y-m-d H:M:S" or "m/d/Y H:M:S"

with seconds

"Y-m-d H:M" or "m/d/Y H:M"

without seconds

secs

(T|F) Seconds are included in time values

AMPM

(T|F) Time format is in AM/PM format

Value

Returns a strptime object in "%Y-%m-%d %H:%M:%S" or "%Y-%m-%d %H:%M" format

Examples

## Not run: dayhr.fn("2021-05-10 14:22:34", secs=T , AMPM = F)


Columbia-Basin-Research-West/cbrATLAS documentation built on April 1, 2022, 1:52 p.m.