I have a database table as below :
signdetail
userid | login | logout
00001 | 5/6/2004 08:25:10 | 5/6/2004 18:05:00
00002 | 5/6/2004 10:10:00 | 5/6/2004 14:00:05
00001 | 5/7/2004 07:20:00 | 5/7/2004 15:10:05

Above is some example of data

How would I write in SQL to display all the transaction that user login after 8.30am or logout before 5.00pm?


String sqlsign = "SELECT * FROM signdetail WHERE UNIX_TIMESTAMP(logout).....?

Is it using UNIX_TIMESTAMP? or any idea?

Thx