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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

determing age 1

Status
Not open for further replies.

TheConeHead

Programmer
Aug 14, 2002
2,106
US
How can I get a number of days returned given a datetime field entry (i.e. 10/15/2006 12:45:12 PM) and the current date?

Is it possible to get something like: 56 (as in 56 days)

returned?

[conehead]
 
Not sure If I've understood your question correctly and maybe I'm simplyfying it a little but I would do do this...

SELECT DATEDIFF(d, '15/10/2006',GETDATE())
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top