[R] exporting dates into Microsoft SQL Server

r user ruser2006 at yahoo.com
Tue Jan 24 00:52:35 CET 2006


I am running R 2.1.1 in a Windows XP environment.

I wish to use the sqlSave command to export a
dataframe into Microsoft SQL.

My dataframe is called temp and has 2 “columns”,
“monthenddate” and “value”.

Monthenddate is in 'POSIXct', format. (i.e. 'POSIXct',
format: chr  "1984-01-31" "1984-01-31" "1984-01-31"
"1984-01-31" ...).

How can I export this dataframe into SQL and have the
format in SQL by one of the “standard” SQL date
formats?

I am using the following r code:

db <- odbcConnect("testserver")
sqlSave(db, temp)




More information about the R-help mailing list