cancel
Showing results for 
Search instead for 
Did you mean: 

Counting the Number of days by Month

former_member960606
Discoverer
0 Kudos

Hello,

I have a report I'm creating where I need to calculate the number of days per month between a date range. So, for instance, if I have a begin date of 1/1 and an end date of 3/31, I need to show 31 days for January, 28 days for February, and 31 days for March. Is there any way that anybody can think of to accomplish this task?

I'm using SAP BusinessObjects BI Platform 4.1 Support Pack 10 Patch 3

Version: 14.1.10.2605

Any help will be greatly appreciated

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

mhmohammed
Active Contributor
0 Kudos

Hi,

Do you know about the Daysbetween() function? Please check it out.

Thanks,
Mahboob Mohammed

former_member960606
Discoverer
0 Kudos

Mahboob,

First, thanks for responding to my inquiry. The Daysbetween() function would give me the total number of days between the 2 dates. I'm looking for a way to show the total number of days per month between 2 dates. So, for example, if I have a begin date of 1/31 and an end date of 3/15, I need to be able to show a count of 31 days for January, 28 days for February, and 15 days for March.

mhmohammed
Active Contributor
0 Kudos

Wow, I get it now, it's a great requirement. Do you want to show all that text in just 1 row/cell? It'll all be like 1 big sentence. Is that correct? I can think of a solution, which involves creating many variables, and if you've begin and end dates from a different year, it may get a little more complicated.

Can you tell me how are you getting that Begin and End dates? Are they coming from a prompt? Do they have Year value as well? Just so you know, I've got a great idea (out of the 2 I have), I'll try to help, but you'll have to help me (respond to my questions) to help you better.

Thanks,
Mahboob Mohammed