Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: SQL Server
Expertise: Beginner
Nov 20, 1998



Application Security Testing: An Integral Part of DevOps

Sort by date

In a project tracking database, one of the columns in a table contains the date in this format: MM/DD/YY. I would like to be able to see a listing of projects that are overdue. Is it possible to query the table so that the SQL statement returns only records with dates before the current date? How do I retrieve today's date?

I'll assume that the field you are talking about is defined as a date. (If not, you will have to use either the convert function or some of the string functions with the convert to have it treated as a date). You could then simply say:

select * from projects
projdate < getdate() 

—getdate returns today's date

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date