num_dt_dttm() returns the type that results in a datetime closer to the current datetime. It returns NA_character_ if the input is a missing value.

num_dt_dttm(date)

Arguments

date

A date in numeric format

Value

"date", "datetime", or NA_character_