Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello everyone,
i need to calculate number of days based on the selection.
for example: if i select 2014, it should give me the days count from Jan 1st 2014 to 19 Sep 2014,
if i select 2014 and Jan it should give 31 as count
if i select 2013, it should give 365
like this i need to calculate
can any one please help how to calculate this.
Thanks in Advance
Check enclosed file..
Assuming you have a Date field you can try something like this:
=DayNumberOfYear(max(Date))
max(Date) will give you the maximum selected date, thus if you only select 2013, it will return 31-Dec-2013.
DayNumberOfYear() will return you the numbers of days in that particular year...
Considering that you have Month and Year fields as list box..
=IF(GetFieldSelections(Year) and IsNull(GetFieldSelections(Month)), Interval((IF(Today() < YearEnd(MakeDate(Year)),Today(),YearEnd(MakeDate(Year))))-MakeDate(Year),'dd'),
IF(GetFieldSelections(Year) and Not IsNull(GetFieldSelections(Month)),Interval(MonthEnd(MakeDate(Year,Month))-MakeDate(Year,Month),'dd'))
)
Hello Martin,
it is giving the count of max year which is available at my data, not giving count by selection.
Thanks
Hello Manish,
Thanks for the response,
I tried it, it is giving some negative values
Thanks
Check enclosed file..
Hi
See the Attachment.
Regards
Av7en