title: How to select f POSIXlt data that falls into a certain timeframe?
body: <p>I try to analyze some data imported from a .csv spreadsheet.
  To analyze the data I need to restrict my sample to a certain timeframe (from d.m.Y H:M:S to d.m.Y H:M:S). The time data is in format <code>POSIXlt</code> (converted from <code>character</code> as original input). I am looking for suggestions how to cut this, since my approach does not result in a dataframe, but an empty integer.</p>
  
  <pre><code>    &gt; dF&lt;-NE2A1[1:5,]
      &gt; dF
        Time X.1.oC.0 X.2.pf..do.. X.HK.Temp.oC
        1  18.05.2013 08:29:47  4.93333        1.577        13.80
        2                            NA           NA           NA
        3  18.05.2013 09:00:09  5.10333        1.583        22.63
        4  18.05.2013 10:00:08  5.39333        1.589        31.10
        5  18.05.2013 11:00:07  5.67333        1.593        25.88
        #Converting to POSIXlt format.
        &gt; dF$Time&lt;-strptime(dF$Time, format = "%d.%m.%Y %H:%M:%S")
        #My attempt to select data from a certain timeframe:
        &gt; dF.cut&lt;-which(with(dF, (dF$Time&gt;"2013-05-18 09:00:00"))&amp;(dF$Time&lt;"2013-05-18 11:00:07"))
  </code></pre>
  
  <p>dails. As it results in the following dF.cut:</p>
  
  <pre><code>     &gt; dF.cut
  
       integer(0)
  </code></pre>
  
  <p>Does anybody know a workaround for this problem?
  I made sure, that <code>dF$Time</code> is of type <code>charakter</code>
  not <code>factor</code>.</p>