sas_numeric_to_date | R Documentation |
Convert a SAS date, time or date/time to an R object
sas_numeric_to_date(date_num, datetime_num, time_num, tz = "")
date_num |
numeric vector of serial numbers to convert. |
datetime_num |
numeric vector of date/time numbers (seconds since midnight 1960-01-01) to convert |
time_num |
numeric vector of time numbers (seconds since midnight on the current day) to convert |
tz |
Time zone, used when |
If a date and time or datetime are provided, a POSIXct object. If a date is provided, a Date object. If a time is provided, an hms::hms object
SAS Date, Time, and Datetime Values reference (retrieved on 2022-03-08): https://v8doc.sas.com/sashtml/lrcon/zenid-63.htm
Other Date-time cleaning:
convert_to_date()
,
excel_numeric_to_date()
sas_numeric_to_date(date_num=15639) # 2002-10-26 sas_numeric_to_date(datetime_num=1217083532, tz="UTC") # 1998-07-26T14:45:32Z sas_numeric_to_date(date_num=15639, time_num=3600, tz="UTC") # 2002-10-26T01:00:00Z sas_numeric_to_date(time_num=3600) # 01:00:00
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.