Date Time Management in Views of SQL Server 2008
Date Time Management in Views of SQL Server 2008
Date Time Management in Views of SQL Server 2008
Date Time Management in Views of SQL Server 2008
Date Time Management in Views of SQL Server 2008
Date Time Management in Views of SQL Server 2008 Date Time Management in Views of SQL Server 2008 Date Time Management in Views of SQL Server 2008 Date Time Management in Views of SQL Server 2008 Date Time Management in Views of SQL Server 2008 Date Time Management in Views of SQL Server 2008 Date Time Management in Views of SQL Server 2008 Date Time Management in Views of SQL Server 2008
Date Time Management in Views of SQL Server 2008 Date Time Management in Views of SQL Server 2008
Date Time Management in Views of SQL Server 2008
Go Back  Xtreme Visual Basic Talk > > > Date Time Management in Views of SQL Server 2008


Reply
 
Thread Tools Display Modes
  #1  
Old 04-15-2013, 04:35 AM
mrkamran's Avatar
mrkamran mrkamran is offline
Centurion
 
Join Date: Jun 2003
Posts: 188
Question Date Time Management in Views of SQL Server 2008


Hi,

I want to know how can I compare dates in SQL server views. for example I have a date field in a database and I want to add 30 days in this field and then compare it with current system date for specific results.

Thanks and regards

Kamran
__________________
Thoughts determine what you want...Action determines what you get!
Reply With Quote
  #2  
Old 04-15-2013, 04:46 AM
DrPunk's Avatar
DrPunkDate Time Management in Views of SQL Server 2008 DrPunk is offline
Senior Contributor

* Expert *
 
Join Date: Apr 2003
Location: Never where I want to be
Posts: 1,403
Default

In SQL?

DATEADD and DATEDIFF are the most common functions for what you are talking about there.

DATEADD -> http://msdn.microsoft.com/en-gb/library/ms186819.aspx
DATEDIFF -> http://msdn.microsoft.com/en-gb/library/ms189794.aspx
MSDN's SQL date and time info -> http://msdn.microsoft.com/en-gb/library/ms186724.aspx
__________________
There are no computers in heaven!
Reply With Quote
  #3  
Old 04-15-2013, 07:17 AM
mrkamran's Avatar
mrkamran mrkamran is offline
Centurion
 
Join Date: Jun 2003
Posts: 188
Default

Thanks DrPunk I have solved my problem
__________________
Thoughts determine what you want...Action determines what you get!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Date Time Management in Views of SQL Server 2008
Date Time Management in Views of SQL Server 2008
Date Time Management in Views of SQL Server 2008 Date Time Management in Views of SQL Server 2008
Date Time Management in Views of SQL Server 2008
Date Time Management in Views of SQL Server 2008
Date Time Management in Views of SQL Server 2008 Date Time Management in Views of SQL Server 2008 Date Time Management in Views of SQL Server 2008 Date Time Management in Views of SQL Server 2008 Date Time Management in Views of SQL Server 2008 Date Time Management in Views of SQL Server 2008 Date Time Management in Views of SQL Server 2008
Date Time Management in Views of SQL Server 2008
Date Time Management in Views of SQL Server 2008
 
Date Time Management in Views of SQL Server 2008
Date Time Management in Views of SQL Server 2008
 
-->