cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate Difference between Two Dates and Eliminate Weekend in WEBI

Former Member
0 Kudos

hi

I have below requirements which i want to find the differences in their time frame.

I do concatenation if Modified Time and Modified Date in to one Column Name (Modified Final)

Again I combine Create Date and Create Time in to column name (Create Final)

Recent Modified Time along with Modified Date.

Modified TimeModified DateCreate DateCreate TimeFinal Result
1/1/201010:011/1/20109:301/1/2010  1/1/2010 10:01
2/2/201012:001/1/201010:002/2/10  12:00
2/1/201010:012/1/201010:002/1/2010 10:01

I want to calculate Difference between this

=(Modified Date & Modified Time- Creation Date and Creation Time) and Eliminate Weekends in this range fields.

Final Result Should be

= (Modified Date and Time (days calculate weekdays)- Creation Date and Time(Weekends))

Thanks

ram

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Do you have time dimension in your universe?

Former Member
0 Kudos

Avinash,

Thanks for your reply.

Time dimension are not separate, its is a part of Modified date and Creation date from SAP Source system.

Former Member
0 Kudos

This should work

=RelativeDate([object];Floor(DayNumberOfWeek([object])/6)*(8-DayNumberOfWeek([object])))

If your date falls on Saturday it would adjust itself to Monday..Sunday becomes Monday as well

Former Member
0 Kudos

Avinash,

Thanks for your mail.

If you don't mind kind give me how to hard code based on this column.

In your code can you mention this column name and please share me.

Modified Date and Modified Time and Creation Date and Creation Time

With 4 Dimension I want to Calculate the difference between Modified-Creation.

Thanks

ram

Former Member
0 Kudos

=RelativeDate([object];Floor(DayNumberOfWeek([object])/6)*(8-DayNumberOfWeek([object])))


should be


=RelativeDate([final date];Floor(DayNumberOfWeek([final date)/6)*(8-DayNumberOfWeek([final date)))


..Assuming you already have the datediff done between modified and created time

Former Member
0 Kudos

Avinash,

Thanks for your reply once again.

Even I don't know what is that datediff, kindly suggest me as well.

Thanks

ram

Former Member
0 Kudos

Do you have your final day object use that in he formula i mentioned above

Former Member
0 Kudos

I believe I can get Date Difference base based on Modified Date- Creation Date? I'm a right.

Answers (0)