View Full Version : Using MAX in SQL statement
I have a SQL statement that uses MAX and MIN in a date feild. When the results are returned as long as the two dates are in the same year, I'm ok when this isnt the case it seems that the function reads the string left to right and puts 01/01/03 before 12/01/02
thanks in advance
can you post your SQL statement and a result sample?
think Ive fixed it...for now
Since I hate when I look at posts with no resolution.
MIN(CONVERT(VARCHAR(20), usage_date, 101)) date_first_view,
I removed the (CONVERT(VARCHAR(20), usage_date, 101)) from within the sql statement and replaced it with (usage_date)
MIN(usage_date) date_first_view,
vBulletin v3.0.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.