473,498 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Date Comparing

3 New Member
Hi all,

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

i want to compare date from this 01-Sept-2010 to 21-Sept-2010, the amount must be "USD23,185" 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

Anyone can do this?

Thanks a lot
Dec 2 '09 #1
1 1542
jeffstl
432 Recognized Expert Contributor
You'll want to look into the DateDiff function

http://www.vb6.us/tutorials/learn-ho...ediff-function
Dec 2 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

16
13099
by: Donnal Walter | last post by:
I was very surprised to discover that >>> import datetime >>> x = datetime.date(2004, 9, 14) >>> y = datetime.datetime(2004, 9, 14, 6, 43, 15) >>> print x == y True How can these two...
4
2988
by: Lynn | last post by:
On a form I have Date_Start Date_End I have a new Date_Start1 Date_End1 which the use inputs. I need to validate that Date_Start1 and...
8
463
by: Kurien Baker Fenn | last post by:
I have a problem in comparing two dates.when i compare two dates it's only taking the days into consideration.for example when i select 10th may 2004 as my first date and 1st may 2004 as my second...
21
11028
by: Javier | last post by:
Hi I´ve a routine that will read date and times in a vector of strings ie: 30/02/2005 19:20 In some moment I´ll need to check if there are in vector a date like current date with a time...
0
1960
by: Brian Conway | last post by:
I am having some validation and insertion problems. I am using a date picker that takes the selected date and puts it to ("dd-MMM-yyyy") format, as this was the only format that Oracle would...
5
3786
by: Kermit Piper | last post by:
Hello, I am comparing two date values, one from a database and one that has been converted from a hard-coded string into an actual Date type. So far so good. The problem I'm having is that one...
2
1391
by: Bob | last post by:
Hi, I have a wrong result when testing today against a date fetched from a table in excel. The value in excel is: 14/12/2006 (european format). When today is after that value in excel, the...
2
1801
by: Praveen | last post by:
DateTime.UtcNow is added as root attribute, 'Modified' of an xml whenever xml is changed. Every 5 secs a check is made whether xml is changed or not, by comparing previous 'Modified' and current...
4
7388
by: anagai | last post by:
I just want to check if a date entered in a textbox is equal to the current system date. I set the date object from the input field like this: dt1=new Date('10/01/2007'); the current system...
1
1213
by: cmrhema | last post by:
Hi, I have designed an employee portal. The moment the user logs in and logs out the current datetime will be stored. Before the user logs out I should ensure whether he/she has entered the work...
0
7126
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
6891
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7381
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5465
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4916
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3096
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3087
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
659
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
293
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.