![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
num | startDate | endDate | reason | +-----+--------------+--------------+----------------------+ 2 | Sep 1, 2006 | Sep 4, 2006 | Labor Day | 3 | Oct 6, 2006 | Oct 10, 2006 | Fall Break | 5 | Nov 21, 2006 | Nov 26, 2006 | thanksgiving | 4 | Nov 10, 2006 | Nov 12, 2006 | veteran's day | 12 | Mar 5, 2007 | Mar 11, 2007 | Spring Break Week | 11 | Mar 2, 2007 | Mar 4, 2007 | Spring Break Weekend | 10 | Jan 12, 2007 | Jan 15, 2007 | MLK Weekend | 7 | Dec 30, 2006 | Jan 1, 2007 | new year's break | 6 | Dec 23, 2006 | Dec 29, 2006 | Christmas Break | 9 | Apr 14, 2007 | Apr 14, 2007 | Special Closing | +-----+--------------+--------------+----------------------+ |
#2
| |||
| |||
|
|
select num, DATE_FORMAT(startDate,'%b %e, %Y') as startDate ^^^^^^^^^ ^^^^^^^^^ |
#3
| |||
| |||
|
|
My sql query will not seem to bring back dates in the correct order. select num, DATE_FORMAT(startDate,'%b %e, %Y') as startDate, DATE_FORMAT(endDate, '%b %e, %Y') as endDate, reason from exceptionDates order by startDate DESC, endDate DESC; .... |
|
+-----+--------------+--------------+----------------------+ | num | startDate | endDate | reason | +-----+--------------+--------------+----------------------+ | 2 | Sep 1, 2006 | Sep 4, 2006 | Labor Day | | 3 | Oct 6, 2006 | Oct 10, 2006 | Fall Break | | 5 | Nov 21, 2006 | Nov 26, 2006 | thanksgiving | | 4 | Nov 10, 2006 | Nov 12, 2006 | veteran's day | | 12 | Mar 5, 2007 | Mar 11, 2007 | Spring Break Week | | 11 | Mar 2, 2007 | Mar 4, 2007 | Spring Break Weekend | | 10 | Jan 12, 2007 | Jan 15, 2007 | MLK Weekend | | 7 | Dec 30, 2006 | Jan 1, 2007 | new year's break | | 6 | Dec 23, 2006 | Dec 29, 2006 | Christmas Break | | 9 | Apr 14, 2007 | Apr 14, 2007 | Special Closing | +-----+--------------+--------------+----------------------+ |
![]() |
| Thread Tools | |
| Display Modes | |
| |