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

Calculating the difference between 2 dates

Status
Not open for further replies.

mattbrenn

Programmer
Jun 4, 2003
11
GB
Hi there
I wondering how to calculate the difference between 2 dates. The cube i inherited contains within it a Promised Date and a Received Date, I've been tasked with showing the difference between the 2 and I'm not sure how best to go about it.
TIA
Matt
 
Hi,

Can you use DATEDIFF()?

=DATEDIFF(dd, [dim].[date1], [dim].[Date2])

Not sure but might be worth a go.

Hope this helps.

Leigh Moore
Business Systems Manager
Vets4Pets Veterinary Group
 
Cheers for the info Leigh.

I used this in the stored procedure I've got to create the fact table, the data comes out fine as is now useable in the OLAP cube.
Thanks again.

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top