Home > Archive > MS SQL Server > March 2006 > Re: criteria for a datetime field









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: criteria for a datetime field
Raman Iyer [MS]

2006-03-31, 3:23 am

[forwarding to the relational database newsgroups]


"SAC" <sac@sac.com> wrote in message
news:%23vbhjtHVGHA.1868@TK2MSFTNGP09.phx.gbl...
> I'm trying to set the criteria for a datetime field for all dates not
> older
> than 60 days from the current system date.
>
> GetDate() -60 doesn't work.
>
> How do I do this?
>
> Thanks.
>
>



ML

2006-03-31, 3:23 am

Look up DATEDIFF and DATEADD in Books Online.

http://msdn.microsoft.com/library/d..._da-db_5vxi.asp

http://msdn.microsoft.com/library/d..._da-db_3vtw.asp


ML

---
http://milambda.blogspot.com/
SAC

2006-03-31, 9:23 am

Thanks!

"ML" <ML@discussions.microsoft.com> wrote in message
news:5F2490C9-6863-4B56-9A29- DAF8DB0782E5@microso
ft.com...
> Look up DATEDIFF and DATEADD in Books Online.
>
>

http://msdn.microsoft.com/library/d..._da-db_5vxi.asp
>
>

http://msdn.microsoft.com/library/d..._da-db_3vtw.asp
>
>
> ML
>
> ---
> http://milambda.blogspot.com/



ML

2006-03-31, 9:23 am

NP :)
Just remember this newsgroup.


ML

---
http://milambda.blogspot.com/
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com