You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bq_datetime_parse<-function(x) {
# `format` matches clock already.# Bigquery DATETIME is documented as microsecond precision.# https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#datetime_typex<-clock::year_month_day_parse(x, precision="microsecond")
# Manually retain microseconds for the POSIXctmicroseconds<-clock::get_microsecond(x)
microseconds<-microseconds/1000000# Convert to POSIXct at second precision since that is what clock asserts# the precision of a POSIXct is. Can use sys-time since we are going straight# to UTC.x<-clock::calendar_narrow(x, "second")
x<-clock::as_sys_time(x)
x<- as.POSIXct(x, tz="UTC")
# Manually add microseconds back on (lossy, floating point issues!)x<-x+microsecondsx
}
The text was updated successfully, but these errors were encountered:
After
clock/vignettes/faq.Rmd
Line 216 in adc01b6
Using this as an example
r-dbi/bigrquery#591 (comment)
The text was updated successfully, but these errors were encountered: