It is possible to insert date and time information as a 
character string into an Oracle DATE data type 
with ROracle. In an older e-mail it has been stated 
that it is only possible to insert the date as a string
into a DATE field.

The solution is as follows:
Before inserting the character string the default 
value for the NLS_DATE_FORMAT must be changed in Oracle, 
e.g.

...
res<-dbSendQuery(con,"alter session set NLS_DATE_FORMAT = 'dd-mm-yyyy hh24:mi:ss'")
dbClearResult(res)
...

After you have processed these commands you can insert a
character string that matches the above format into an
Oracle DATE data field with the dbPrepareStatement and
dbExecStatement commmands.

You can define also other formats using the Oracle date and 
time format rules.

Regards
Stefan Ulrych

Visit our website at http://www.ubs.com

This message contains confidential information and is intend...{{dropped}}

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to