...

View Full Version : compare date type column



rei69
07-28-2006, 10:04 AM
is there anyway i can compare 3 or more date type column?

let's say i have
------------------------------------------------
date1 | date2 | date3
------------------------------------------------
2006-06-01 | 2006-06-15 | 2006-09-19
------------------------------------------------

can i just get the earliest date by command line?
select XXXXX(date1,date2,date3) <--returns '2006-06-01 '
select YYYYY(date1,date2,date3) <--returns '2006-09-19 '

thanks

rei69
07-28-2006, 01:46 PM
got the solution

greatest and least are the functions

guelphdad
07-28-2006, 02:00 PM
Thanks for coming back to post the solution.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum