Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date field puzzle 1

Status
Not open for further replies.

kupe

Technical User
Sep 23, 2002
376
I'd like to sort the files by the date field (DoA), when when it is used like this, how do I, please, Gurus?

... CONCAT(TO_DAYS(Curdate()) - TO_DAYS(DoA), 'days') AS LateBy ... ORDER BY LateBy DESC;
 
You should be able to use[tt] ORDER BY doa DESC; [/tt]even if it's not included in the result set.
 
Brilliant, Tony. I was going to try that, but it seemed unlikely. Now I know better. Much obliged.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top