Date functions

Reply

Join Date: Aug 2005
Posts: 17
Reputation: StrikeFreedom is an unknown quantity at this point 
Solved Threads: 0
StrikeFreedom StrikeFreedom is offline Offline
Newbie Poster

Date functions

 
0
  #1
Nov 28th, 2005
I'm doing an code the would list events entered by people and it's sorted by date, what I want it to do though is to list out only those who's starting dates haven't passed yet. How should I build the query? Could it be as simple as "SELECT * FROM events WHERE sort_date < NOW()" ?
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 902
Reputation: chrisbliss18 is an unknown quantity at this point 
Solved Threads: 23
chrisbliss18's Avatar
chrisbliss18 chrisbliss18 is offline Offline
Posting Shark

Re: Date functions

 
0
  #2
Nov 28th, 2005
This is an SQL question, which belongs in the database section.

If you want to find all the records that have dates in sort_date that are after the current date, use the following query:
  1. SELECT * FROM events WHERE sort_date>NOW()
Notice that you want the sort_date to be greater than NOW(), not less than.
Did we help you? Did we miss the point entirely? Update your thread and let us know.
Don't like the answers you are getting?
Did you try searching?
Clean up and optimize Windows 2000/XP
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC