I have a table named report that looks like following;

which are the types of,

Here I'm trying to change the rows filtering by order_id and start_picking_hour. There is no problem with order_id. However, I cannot achieve anything when I filter by start_picking_hour.
For example, the following code works, and SQL Manager says that "2 rows affected";
UPDATE report SET picked_count = 10 WHERE order_id = 168366
However, I'm trying to filter by both order_id and start_picking_hour. I am not sure about how to filter by a type of timestamp. None of the following queries I tried worked. Each one returned a message of "0 rows affected".
UPDATE report SET picked_count = 10 WHERE order_id = 168366 and
start_picking_hour = TO_TIMESTAMP('2/17/2015 10:12:51 AM','dd-mm-yyyy hh12:mi:ss')
UPDATE report SET picked_count = 10 WHERE order_id = 168366 and
start_picking_hour = TO_TIMESTAMP('2/17/2015 10:12:51','dd-mm-yyyy hh12:mi:ss')
UPDATE report SET picked_count = 10 WHERE order_id = 168366 and
start_picking_hour = TO_TIMESTAMP('2/17/2015 10:12:51 AM','dd-mm-yyyy hh:mi:ss')
UPDATE report SET picked_count = 10 WHERE order_id = 168366 and
start_picking_hour = TO_TIMESTAMP('2/17/2015 10:12:51','dd-mm-yyyy hh:mi:ss')
UPDATE report SET picked_count = 10 WHERE order_id = 168366 and
start_picking_hour = '2/17/2015 10:12:51 AM'
UPDATE report SET picked_count = 10 WHERE order_id = 168366 and
start_picking_hour = 2/17/2015 10:12:51 AM
UPDATE report SET picked_count = 10 WHERE order_id = 168366 and
start_picking_hour = '2/17/2015 10:12:51'
UPDATE report SET picked_count = 10 WHERE order_id = 168366 and
start_picking_hour = 2/17/2015 10:12:51
What is the exact way of filtering by timestamp in a WHERE clause? I am using PostgreSQL.
timestampalso contains fractional seconds (which your timestamp literal does not have). Not sure if your SQL client displays them, but you could try:date_trunc('second', start_picking_hour) = timestamp '2015-02-17 10:12:51'that will get rid of milliseconds in thestart_picking_hourcolumn.