oops change day to yy or yyyy

-----Original Message-----
From: Sicular, Alexander [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 11:47 PM
To: CF-Talk
Subject: RE: how to retrieving data by age of record in MSSQL


Something like

Select * from mytableostuff
Where salesdate > 'DATEADD(day, -5, getdate())'

Gl,

Alexander Sicular
Chief Technology Architect
Neurological Institute of New York
Columbia University
as867 [at] columbia {dot} edu


|-----Original Message-----
|From: han peng [mailto:[EMAIL PROTECTED]] 
|Sent: Thursday, March 21, 2002 11:49 PM
|To: CF-Talk
|Subject: how to retrieving data by age of record in MSSQL
|
|
|hihi..all gurus.. i know this is not appropriate here... sorry 
|to bother u all....  i need to write a query to retrieve 
|existing records by age of the records..
|
|
|eg. user want to see Sales orders that are  5 yrs old..
|
|so i need to write a query to retrieve from sales table.. 
|where theres a orderdate column int it.. datatype is datetime.
|
|so how am i going to write the query in mssql..??
| oracle can use trunc() .. but mssql dont hav that... :(
|
|help help..
|
|hanpeng
|
|

______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to