4

Halo,

im importing tables from MS-Access into R via

channel <- odbDriverConnect(...)
foo_import <-sqlFetch(channel,"foo")

now Im using the RSQLite for SQL Querys and other stuff

dbWriteTable(conn, "foo_table", foo_import)
R_Table <- dbReadTable(conn, "foo_table")

the Problem is, that at the sqlFetch step columns including data are still correct, tested with class(foo_import$Datetime) which gives POSIXct POSIXt

After using dbWriteTable and testing the Format with class(R_Table$Datetime) which gives numeric The Dates are just numbers

with as.POSIXct(R_Table$Datetime, origin= "1970-01-01")

I can transform the column manually. Are they other options to Change the format automatically to a date Format ?

nghauran
  • 6,648
  • 2
  • 20
  • 29
Leo96
  • 489
  • 3
  • 12
  • [This](https://stackoverflow.com/questions/16847809/roracle-dbwritetable-creating-oracle-timestamp-columns-for-r-date-columns) and [this](https://stackoverflow.com/questions/28914875/roracle-dbwritetable-date-columns) can help – nghauran Oct 27 '17 at 08:34
  • It doesnt help me :/ I couldnt find a solution for my problem – Leo96 Oct 30 '17 at 07:20

0 Answers0