Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Date Comparing
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Date Comparing

 Post Reply Post Reply
Author
bsy View Drop Down
Newbie
Newbie


Joined: 03 December 2009
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote bsy Quote  Post ReplyReply Direct Link To This Post Topic: Date Comparing
    Posted: 03 December 2009 at 3:15am
Hi all,

I'm 1st time ASP classic user. Need ASP expert guidance. Embarrassed

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 if



Any one can help?

Thanks a lot.



Edited by bsy - 03 December 2009 at 3:22am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.