Friday, May 25, 2012

Date Functions

I always find date functions difficult to code as they can be confusing. Here are some of the date functions that can come handy while working with dates in Business Objects.
 
Last day of month =LastDayOfMonth(< Month>) 
First day of month =DayNumberOfWeek(< Month>) 
Days in a month  =DaysBetween(< Month> ,<last day of month >)+1 
Weekends =(Truncate((DayNumberOfWeek(< Month>)+<Days in a month >)/7 ,0)) 
Working Days =Floor(<Days in a month>-(<Weekends>)) 
6 working Days =If <first day of month > = 7  Then (< Working Days >+1) Else < Working Days >