title: R POSIXct cannot be used in sql query
body: <p>I have a connection that brings data from slq with format datetime. I need to keep tre time part too.</p>
  
  <pre><code>head(llamMitUadm$responseTime)
  [1] "2014-10-07 08:00:33.780" "2014-10-07 08:01:17.813" "2014-10-07 08:01:19.450"
  [4] "2014-10-07 08:01:34.773" "2014-10-07 08:01:54.950" "2014-10-07 08:02:08.607"
  
  &gt; class(llamMitUadm$responseTime)
  [1] "character"
  </code></pre>
  
  <p>Then I convert it to datetime:</p>
  
  <pre><code>llamMitUadm$responseTime1&lt;-strptime(llamMitUadm$responseTime, format="%Y-%m-%d %H:%M:%S")
  
  &gt; class(llamMitUadm$responseTime1)
  [1] "POSIXlt" "POSIXt"
  
  &gt; head(llamMitUadm$responseTime1)
  [1] "2014-10-07 08:00:33 ART" "2014-10-07 08:01:17 ART" "2014-10-07 08:01:19 ART"
  [4] "2014-10-07 08:01:34 ART" "2014-10-07 08:01:54 ART" "2014-10-07 08:02:08 ART"
  </code></pre>
  
  <p>The I need to do a sql query and I get the following error:</p>
  
  <pre><code>Error in sqliteSendQuery(conn, statement, bind.data) : 
    RAW() can only be applied to a 'raw', not a 'double'
  </code></pre>
  
  <p>I read that this is related to POSIXt format. How can I keep the datime and be able to perform the query?</p>
  
  <p>Altought I know is not related to the query, I added a reproducible example:</p>
  
  <pre><code>data&lt;-data.frame(date=c("2014-10-07 08:00:33.780","2014-10-07 08:01:17.813","2014-10-07 08:01:19.450"))
  
  
  &gt; class(data$date)
  [1] "factor"
  
   data$date&lt;-as.character(data$date)
  &gt; class(data$date)
  [1] "character"
  
  
   data$date1&lt;-strptime(data$date, format="%Y-%m-%d %H:%M:%S")
      &gt; class(data$date1)
      [1] "POSIXlt" "POSIXt" 
  
   library(sqldf)
  &gt; sqldf("Select * from data")
  Error in sqliteSendQuery(conn, statement, bind.data) : 
    RAW() can only be applied to a 'raw', not a 'double'
  </code></pre>