title: Subsetting data based on time in R
body: <p>I have a set of traffic data that has date and time columns, however, I'm having issues to properly subset the data according to the specific times. Is there a way to properly subset data based on date and time ranges? Using a filter or subset does not seem to work for me. </p>
  
  <p>For e.g. I would like to extract data from <code>17/08/2019</code> to <code>19/08/2019</code> and for the following time periods: <code>06:00</code> to <code>07:00</code>, <code>08:30</code> to <code>10:00</code>, <code>12:00</code> to <code>13:00</code>, <code>17:30</code> to <code>19:00</code>, <code>19:00</code> to <code>20:00</code> and <code>20:00</code> to <code>22:00</code>. I appreciate everyone's advice, please!</p>
  
  <pre><code>Vehicle.No. Date Time Payment.Amount
  SXX0001A 17/08/2019 00:01 1.25
  SXX0002A 17/08/2019 00:21 5
  SXX0003A 17/08/2019 00:31 0
  SXX0004A 17/08/2019 02:01 3
  SXX0005A 17/08/2019 03:01 2
  SXX0006A 17/08/2019 18:01 1.25
  .
  .
  .
  SXX0007A 18/08/2019 00:01 1.25
  SXX0008A 18/08/2019 02:01 1.25
  SXX0009A 18/08/2019 19:01 1.25
  SXX0010A 18/08/2019 20:01 1.25
  .
  .
  .
  SXX0006A 20/08/2019 02:01 1.25
  SXX0006A 20/08/2019 03:01 3.25
  SXX0006A 20/08/2019 01:01 5.25
  SXX0006A 20/08/2019 12:01 0
  SXX0006A 20/08/2019 14:01 1.25
  .
  .
  .
  
  </code></pre>