Home > Net >  Saving to a date / datetime field using SQLSAVE
Saving to a date / datetime field using SQLSAVE

Time:04-03

I'm using the following R code to save into database. However, the date field is not properly saved.

storedata$update = as.character(excelSerialNumToDate(tape$date),"%Y-%m-%d")
sqlSave(channel = dbhandle,dat = storedata,tablename = 'dbo.storeinfo',append = T,rownames = F,colnames = F,verbose = T,safer = F,fast = F, nastring = NULL)

What is the best way to save into a date field using SqlSave in R?

CodePudding user response:

Wrote my own SqlSave to eliminate these issues.

  • Related