Page 1 of 1

[SOLVED] select with time

Posted: Wed Feb 23, 2005 5:48 am
by pelegk2
i have this select

Code: Select all

SELECT from_unixtime(TAARICH_HASPAKA),from_unixtime(TAARICH_TEUDA,'%d.%m.%Y %h%:%i:%s'),sent FROM order_header WHERE TAARICH_TEUDA!=''and from_unixtime(TAARICH_TEUDA,'%d.%m.%Y %h%:%i:%s')<'23.02.2005 8:00:00'
when i run this query and for example the
TAARICH_TEUDA=='23.02.2005 12:14:00'
this value shouldn't been show beacuse i asked for

Code: Select all

from_unixtime(TAARICH_TEUDA,'%d.%m.%Y %h%:%i:%s')<'23.02.2005 8:00:00'
any idea?
thnaks in advance
peleg

Posted: Wed Feb 23, 2005 7:22 am
by feyd
it's using string comparison, it was performing correctly.. you need to compare against '23.02.2005 08:00:00'

thnaks alot!

Posted: Wed Feb 23, 2005 8:20 am
by pelegk2
:)