Hey Vasant:
I learned how to do that browsing these forums (i believe you can do something like below, with the proper pi-sdk library references).
There is a method/function called summary inside PIData that takes as arguments StartTime, EndTime, and SummaryType.
for e.g.
dim PiServerVar as pisdk.server
set PiServerVar = PISDK.Servers("Your_Server_Name")
dim myPiPoint as pisdk.pipoint
set myPiPoint = PiServerVar.PIPoints("Your_Tag_Name")
dim pval as pisdk.pivalue
set pval = myPiPoint.Data.Summary(StartTime, EndTime, astAverage)
' pval.value is a number representing the average value of your tag over the StartTime to EndTime interval
Wait for Rhys to truly help you :] but I think the Summary method will work for tag averages in pi-sdk
Edit:
http://www.rjksolutionsl..._Find-MinMax-Value.aspx
(scroll down to post #5 , by Rhys , and there's a nice function he wrote entitled GetSummary which should do the trick)