Wednesday, August 22, 2012

How to find the day difference between two dates in MicroStrategy?

Create a metric and place the following definition there

sum(ApplySimple("datediff(dd,#0,#1)",[Date1],[Date2]))


where Date 1 and Date 2 are attributes

1 comment:

  1. Good tips,
    Im try statement like this
    ApplySimple(“datediff(‘YYYY’,#0,Now())",[CUST_BIRTHDATE])

    and found error "Searching for datediff resulted no matches"
    can you help me ?

    Oka

    ReplyDelete