cancel
Showing results for 
Search instead for 
Did you mean: 

Date Difference in TWO DATES IN WEBI

Former Member
0 Kudos

Hello friends , I have a requirement to have the number of days between the dates. but when I calculate the formula in WEBI

DaysBetween([Sale Date]; [Invoice Date])

this does not work when i hit ok it says date format is invalid

I checked in universe by default sale date object and invoice date object is of type "character" if i change to date then report does not work at all.

please suggest how do I put the code in WEBI so it works to calculate the difference

2. Also if one date is "Not Assigned then it should take current date or give the output 0

thanks

soniya

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Make sure that the dates are in accpetable date format and date data types.

Hope this helps

Jacques

Answers (1)

Answers (1)

former_member212749
Active Participant
0 Kudos

Hi Soniya,

Can you try this

Daysbetween(To_date(Sale_date);To_date(Invoice_date))

Regards

Prashant

Former Member
0 Kudos

Hello Friends as you suggested I put this formula in WEBI but its not working its giving the value#error

=DaysBetween(ToDate([Delivery date]; "DD/MM/YYYY");ToDate([Goods issue]; "DD/MM/YYYY"))

Also I tried the below by swap the code

=DaysBetween(ToDate([Goods issue]; "DD/MM/YYYY");ToDate([Delivery date]; "DD/MM/YYYY"))

I have goods issue date in Right colum and Delivery date in Left

27.05.2008 14.12.2007

Please help me resolve this error

soniya

former_member212749
Active Participant

Hi ,

The above formula would have worked but as you have the Date as 25.07.2009 you have a Dot and the object is a charecter hence you need to do this

replace (<goods issue>,".","")

then use this

=DaysBetween(ToDate(Goods issue; "DD/MM/YYYY");ToDate(Delivery date; "DD/MM/YYYY"))

Hope this would help you.

Regards

Prashant