<p>I need to add 30 minutes to values in a Oracle date column.  I do this in my SELECT statement by specifying </p>

<p><code>to_char(date_and_time + (.000694 * 31)</code></p>

<p>which works fine most of the time.  But not when the time is on the AM/PM border.  For example, adding 30 minutes to <code>12:30</code> [which is  PM] returns <code>1:00</code> which is AM. The answer I expect is <code>13:00</code>.  What's the correct way to do this?</p>

Be sure that Oracle understands that the starting time is PM, and to specify the HH24 format mask for the final output.
```
```
SELECT to_char((to_date('12:40 PM', 'HH:MI AM') + (1/24/60) * 30), 'HH24:MI') as time
  FROM dual

TIME
---------
13:10
```
```
Note: the
```
'AM'
```
in the HH:MI is just the placeholder for the AM/PM meridian indicator. Could be also
```
'PM'
```