ticks2datetime: Convert NET ticks to 'POSIXct' datetime

View source: R/utils.R

ticks2datetimeR Documentation

Convert NET ticks to POSIXct datetime

Description

Convert NET ticks to POSIXct datetime

Usage

ticks2datetime(ticks, tz = "GMT")

datetime2ticks(x)

Arguments

ticks

values in NET ticks format

tz

timezone, passed to as.POSIXct

x

values in date-time format coerced to ticks

Details

reference: https://stackoverflow.com/questions/35240874/r-net-ticks-to-timestamp-in-r

See Also

Other gt3x-utils: get_n_samples(), is_gt3x()

Other gt3x-utils: get_n_samples(), is_gt3x()

Examples

mystr = "599633592352500000"
x = read.gt3x::ticks2datetime(mystr)
x
out = read.gt3x::datetime2ticks(as.POSIXct("1901-03-02 08:40:35.25", tz = "UTC"))
out = as.character(out)
out
stopifnot(out == mystr)
read.gt3x::datetime2ticks(x = as.POSIXct(Sys.time(), tz = "EST"))

THLfi/read.gt3x documentation built on July 6, 2022, 11:06 a.m.