Learn R Programming

sqliteutils (version 0.1.0)

slu_date_to_r: Converts dates stored on 'SQLite' to their original values

Description

Converts dates stored on 'SQLite' to their original values

Usage

slu_date_to_r(date_sqlite)

Arguments

date_sqlite

the numbers that result from inserting dates on 'SQLite'

Value

the dates that were originally inserted

Examples

Run this code
# NOT RUN {
data <- data.frame(date = as.Date("2021-09-18"))
con <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
DBI::dbWriteTable(conn = con, name = "dates", value = data )
data_from_bd <- DBI::dbReadTable(conn = con, name = "dates")
original_date <- slu_date_to_r(data_from_bd$date)
DBI::dbDisconnect(con)

# }

Run the code above in your browser using DataLab