num2date: Convert Excel days since origin to POSIXct data type...

View source: R/swt.R

num2dateR Documentation

Convert Excel days since origin to POSIXct data type (date/time)

Description

Convert Excel days since origin to POSIXct data type (date/time)

Usage

num2date(
  days,
  origin = "1899-12-30",
  tz = "CET",
  filter = TRUE,
  pattern = "[0-9]{2}\\.[0-9]{2}\\.[0-9]{4}",
  format = "%d.%m.%Y",
  round = TRUE
)

Arguments

days

days since origin as numeric or string

origin

origin, default in excel is 1899-12-30

tz

time zone to be forced upon

filter

a fix for dates not recognized (default is TRUE)

pattern

the pattern to find dates not recognized

format

format to convert dates not recognized, e.g. %d.%m.%Y %H:%M:%OS

round

recommended when format has no time, only date information

Value

date of the type POSIXct


schw4b/swt documentation built on April 5, 2025, 7:26 a.m.