0

Within R I am receiving tables from an Oracle database. However, unfortunately something is going wrong in the conversion within ROracle: dates are converted to POSIXct but for some strange reason same dates can differ by one hour (see my other post here). In the end I need the dates in R as a string (for consistency reasons with already existing code) in the format "dd/mm/yyyy". So for example, I will change the query

SELECT PK_CASHFLOW_DATE FROM MYTABLE 

to

SELECT TO_CHAR(PK_CASHFLOW_DATE, 'mm/dd/yyyy') FROM MYTABLE 

However, in the R code the query is dynamically build up and upfront I do not know which columns of the table are DATE columns. How can I still modify a query consistently such that it will always change the DATE columns into a char as described above.

Thanks!

N Meibergen
  • 362
  • 2
  • 14
  • Off by one-hour problems are usually a sign of daylight savings time problems. – G. Grothendieck May 31 '17 at 11:32
  • ....or multiple locations saving to the same database from different time zones with a Z adjustment, each saving their own time, instead of an absolute time agreed upon in advance. – sconfluentus May 31 '17 at 11:50

0 Answers0