Ok, so I am collecting Admit Date and Term Date for each record. I want to count the number of days by month between those dates. So for, Admit Date = 01/20/11 and Term Date = 02/05/11, I want the following output:
Jan, 11 = 12 days ... (31 - 20 + 1 to include the first day)
Feb, 11 = 5 days
I've been using the Datediff function, and it works fine but I'm having trouble accounting for all possibilities. ie: how to identify the jump between months, what if the range spans 3+ months, how to account for leap year, if the Term Date is blank, how can I get the formula to use the date() function to use the current date.
Is there an easy way to account for all this without having to code out every possible combination and hard code the number of days in each month?
Thanx
Jan, 11 = 12 days ... (31 - 20 + 1 to include the first day)
Feb, 11 = 5 days
I've been using the Datediff function, and it works fine but I'm having trouble accounting for all possibilities. ie: how to identify the jump between months, what if the range spans 3+ months, how to account for leap year, if the Term Date is blank, how can I get the formula to use the date() function to use the current date.
Is there an easy way to account for all this without having to code out every possible combination and hard code the number of days in each month?
Thanx