Hi all,
I'm 1st time ASP classic user. Need ASP expert guidance.

I got a table called 'peakprice'.
FromDate ToDate PriceUSD Peak
2010-09-01 2010-09-15 1,220.00 High
2010-09-16 2010-12-16 977.00 Low
2010-08-01 2010-08-31 1,460.00 Peak
.
.
.
.
.
i want to compare all the date from peakprice table. 01-Sept-2010 to 21-Sept-2010 for both peaks if its falls on that date category....
E.g:
For the rental period from 1st Sept – 21st Sept 2010
1st – 15th Sept 2010 - USD 1,220 (High) USD 1,220 x 15 Days = 18,300
16th – 21st Sept 2010– USD 977 (Low) USD 977 x 5 Days = 4,885
Total: USD 23,185
---------------------------------------------------------------------------------------------------
Should i put the date compare in here after
THEN?
This is my code:
If Not rsSP2.EOF Or Not rsSP2.BOF Then
peakprice = rsSP2.Fields.Item("Price").Value
peakpriceusd = rsSP2.Fields.Item("PriceUSD").Value
peakrate = rsSP2.Fields.Item("Peak").Value
peakprice = peakprice * mydatediff
peakpriceusd = FormatNumber(CInt(peakpriceusd), 2) * mydatediff
'peakpriceusd = peakpriceusd * mydatediff
peakprice = FormatNumber(peakprice, 2)
peakpriceusd = FormatNumber(CInt(peakpriceusd), 2)
exchangerate = rsvillarate.Fields.Item("Rate").Value
End ifAny one can help?
Thanks a lot.
Edited by bsy - 03 December 2009 at 3:22am