var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: SELECT DATE problem SQL 2000
I am runing this VIEW :
SELECT users.id FROM users WHERE CONVERT(DATETIME, users.Inscription, 111) = CONVERT(DATETIME, '2006/02/14 12:00:00', 111)
the datestyle 111 = yy/mm/dd
I want to compare the dates without the times
the view returns nothing when they are > 10 rows in the database for 2006/02/14
how can i search on universal date yy/mm/dd ? or yyyy/mm/dd
in the datestyle there is nothing for yyyy/mm/dd thats crazy !
thank you for helping
date styles : http://www.sqljunkies.com/Article/66...C7FD826E5.scuk
WHERE dateadd(day, datediff(day, 0, users.Inscription), 0) ='2006/02/14 12:00:00'
WHERE users.Inscription >='2006/02/14 12:00:00'
and users.Inscription < dateadd(day, 1, '2006/02/14 12:00:00')
but is it the only normal way to lookk for a date !!???
i try :-(
it works in that way
WHERE (CONVERT(DATETIME, users.Inscription, 111) >= CONVERT(DATETIME, '2006/02/14 00:00:00', 111)) AND (CONVERT(DATETIME, users.Inscription, 111)
<= CONVERT(DATETIME, '2006/02/15 00:00:00', 111))
it doesnt work with BETWEEN it will be so praticle
BETWEEN works, but it's evaluation is inclusive, so you would have to adjust one time comparison to a single clock-tick before midnight.