POSIXct
datetimeticks2datetime.Rd
Convert NET ticks to POSIXct
datetime
ticks2datetime(ticks, tz = "GMT") datetime2ticks(x)
ticks | values in NET ticks format |
---|---|
tz | timezone, passed to |
x | values in date-time format coerced to ticks |
reference: https://stackoverflow.com/questions/35240874/r-net-ticks-to-timestamp-in-r
Other gt3x-utils:
get_n_samples()
,
is_gt3x()
Other gt3x-utils:
get_n_samples()
,
is_gt3x()
mystr = "599633592352500000" x = read.gt3x::ticks2datetime(mystr) x#> [1] "1901-03-02 08:40:36.25 GMT"out = read.gt3x::datetime2ticks(as.POSIXct("1901-03-02 08:40:35.25", tz = "UTC")) out = as.character(out) out#> [1] "599633592352500000"#> Warning: date time object not in UTC/GMT, should use lubridate::with_tz or lubridate::tz to change before making ticks#> Warning: unknown timezone 'LMT'#> Warning: unknown timezone 'LMT'#> Warning: unknown timezone 'LMT'#> Warning: unknown timezone 'LMT'#> [1] "637461434341480000"