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

Datediff

Status
Not open for further replies.

globalbear

IS-IT--Management
Dec 5, 2004
27
0
0
SE
I am trying to compare two date fields in Reporting Services. I suppose I should use the datediff-function but I am not sure of the syntax.

I noticed that the following line will give me the day six months from now.
=DateAdd(DateInterval.Month, 6, now())

But how do I compare date1 with date2?
 
Hi,

DateDiff has 3 parts to it, the Interval (Days, weeks, Months etc), the Start Date and the End Date.

Eg DATEDIFF("d", "01/01/2007", "25/01/2007") will calculate the number of days between the 2 dates.

Hope this helps.

Cheers,
Leigh

The problem with common sense is that it isn't that common!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top