4 Replies Latest reply: Jan 20, 2018 10:12 PM by Yeo Poh sai

# How to compute the number of day from 2 date ?

Hi All

I have below 2 expression :-

Date(Date#([Opportunities Expected Close Date],'MM-DD-YYYY'),'MMM-YYYY') as [YearMth_EC],

Date(Date#([Opportunities Created Time],'MM-DD-YYYY hh:mm:ss'),'MMM-YYYY') as [YearMth_CT],

I need to compute the number of day duration for the above 2 date in number of day :-

sum(

Date(Date#([Opportunities Expected Close Date],'MM-DD-YYYY'),'MMM-YYYY') as [YearMth_EC],

-

Date(Date#([Opportunities Created Time],'MM-DD-YYYY hh:mm:ss'),'MMM-YYYY') as [YearMth_CT],

)

It does not work as above.

Paul

• ###### Re: How to compute the number of day from 2 date ?

Hi Anil

Interval( YearMth_EC-YearMth_CT, 'D' )

Thank you very much for the link. it work fine.

Paul

• ###### Re: How to compute the number of day from 2 date ?

NP, But, I would suggest you to surf by your end before creating the thread. Then only you came to know what functionalities can usable in future for each requirement. Because, I've seen you since 2016-April. Still you are looking basics (Sorry if it hurts) - But good to endorse from my end for basic functionalities.

And this case YearMth_EC - YearMth_CT will work

• ###### Re: How to compute the number of day from 2 date ?

Hi Anil

Thank you very much for your strong word.