| Action |
Code |
Details |
|
From ymd
|
ISOdate(year, month, day) |> as.POSIXlt()
|
|
|
From ymd
|
lubridate::make_date(year, month, day) |> as.POSIXlt()
|
|
|
From ymdhms
|
ISOdatetime(year, month, day, hour, minute, second) |> as.POSIXlt()
|
|
|
From ymdhms in UTC timezone
|
ISOdatetime(year, month, day, hour, minute, second, tz = 'UTC') |> as.POSIXlt()
|
|
|
Current date in UTC
|
Sys.Date() |> as.POSIXlt()
|
|
|
Current datetime
|
Sys.time() |> as.POSIXlt()
|
|
|
Current datetime
|
lubridate::now() |> as.POSIXlt()
|
|
|
Current datetime in UTC timezone
|
lubridate::now(tzone = 'UTC') |> as.POSIXlt()
|
|
|
Unix epoch
|
|
|
|
From total seconds since Unix epoch
|
|
|
|
Datetime from YYYY-MM-DD string
|
|
|
|
Datetime from YYYY-MM-DD HH:mm:ss string
|
|
|
|
Date from DD-MM-YYYY string
|
as.POSIXlt(x, format = '%d-%m-%Y')
|
|