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

Calculating No. of Days between two dates

Status
Not open for further replies.

bo5i

Programmer
Jul 22, 2002
36
US
Hi,
I need to calculate no. of days between 2 dates in MicroStrategy using ApplySimple and Datediff('dd',date1,date2). I am aware of using this directly when the two dates are attributes or metrics in MicroStrategy.

But how to calculate and apply the standard ApplySimple along with datediff function to find No. Of Days, with one of the dates being a prompt?

My users have date1 as prompt and date2 as an attribute. I need to calculate the no.of days between date1 and date2.

Appreciate your help.

Thanks in advance.
 
You can use prompt as an input in applysimple. So in your case you can use
Max(applysimple("datediff('dd', #0, #1)", prompt, attribute@ID))

or similar.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top