Ghau Uttar

Ghau Uttar

  • NA
  • 2
  • 5.3k

Average in vb

Nov 22 2012 4:38 PM
i entered a  values form Text box so now im trying to extract my values from my sql reporting services(ssrs 2008) that value entered in years,months and days.i have been able to convert into years,months and days.i dont care if leap year or 31 days as it should be all 30days and 365 days in year.i add all my values if 5 person attends the same room.it can 5 more or less as there is no constant values.What im asking for how can i convert my average values in vb back to years months and days?..will be much better if i convert into only months and days rather than years .an example will be much like this

For Croup of "Grog Addiction"

 4 guys

 Person 1 : 1 yr :360 days

  Person 2 : 2 yrs : 720 days

  Person 3 : 20 days

  Person 4 : 1 month : 30 days

 So Calc is:

 (360+720+20+30)/4 =282.4 DAYS rounded is  282.4/30 = 9 months 13 days


thanks in advance


 



Answers (1)