473,396 Members | 1,968 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

calculating days

hi
I have a table with saison_Id, saison_begin and saison_end in which i have 9
records or 9 saisons. in secodnd table i enter guest_id, guest_name,
guest_arrival and guest_departure.
now i need to calculates how many days did the guest stayed by saisons.
example:
first saison is form 17/07 till 14/08
second saison is form 14/08 till 21/08
so if the guest arrived 24/07 and departured 31/07 then it's 7 days in first
saison
or if the guests arrived 07/08 ad departured 21/08 then it's 7 days in first
and 7 days in sacond saison.
any suggestion how should i solve this problem
thanks in advance
J.J.
Nov 13 '05 #1
2 1235
The first problem you need to resolve is that you have overlapping saisons.
14/08 falls in both the first saison and the second saison. In your second
example where guests arrived 07/08 and departured 21/08, Access will need a way
to know that 14/08 is in the second saison. You also need to be consistent about
this. If guests arrived 07/08 and departured 14/08, it's six days in the first
saison and 1 day in the second saison.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"J.J." <no****@jj.com> wrote in message news:cf**********@ls219.htnet.hr...
hi
I have a table with saison_Id, saison_begin and saison_end in which i have 9
records or 9 saisons. in secodnd table i enter guest_id, guest_name,
guest_arrival and guest_departure.
now i need to calculates how many days did the guest stayed by saisons.
example:
first saison is form 17/07 till 14/08
second saison is form 14/08 till 21/08
so if the guest arrived 24/07 and departured 31/07 then it's 7 days in first
saison
or if the guests arrived 07/08 ad departured 21/08 then it's 7 days in first
and 7 days in sacond saison.
any suggestion how should i solve this problem
thanks in advance
J.J.

Nov 13 '05 #2
the week is begining 07/08 and ending 14/08
but it must count 7 days (7,8,9,10,11,12,13/08) and in the next saison also
"PC Datasheet" <no****@nospam.spam> wrote in message
news:%J*******************@newsread3.news.atl.eart hlink.net...
The first problem you need to resolve is that you have overlapping saisons. 14/08 falls in both the first saison and the second saison. In your second
example where guests arrived 07/08 and departured 21/08, Access will need a way to know that 14/08 is in the second saison. You also need to be consistent about this. If guests arrived 07/08 and departured 14/08, it's six days in the first saison and 1 day in the second saison.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"J.J." <no****@jj.com> wrote in message

news:cf**********@ls219.htnet.hr...
hi
I have a table with saison_Id, saison_begin and saison_end in which i have 9 records or 9 saisons. in secodnd table i enter guest_id, guest_name,
guest_arrival and guest_departure.
now i need to calculates how many days did the guest stayed by saisons.
example:
first saison is form 17/07 till 14/08
second saison is form 14/08 till 21/08
so if the guest arrived 24/07 and departured 31/07 then it's 7 days in first saison
or if the guests arrived 07/08 ad departured 21/08 then it's 7 days in first and 7 days in sacond saison.
any suggestion how should i solve this problem
thanks in advance
J.J.


Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Hans Gruber | last post by:
Hi all, I have been struggling with a problem all day, I have been unable to come up with a working solution. I want to write a function which takes 2 unix timestamps and calculates the...
4
by: John | last post by:
hey all..... alright, I am frusterated to the point of throwing my machine out the window (this board went down, trying to find stuff on google, this has been a nightmare) so I hope you guys can...
12
by: Anthony Robinson | last post by:
Is anyone aware of a function (system or user defined) that will calculate business days? For instance: I have a column in as table called DATE. I want to be able to add five business days to that...
7
by: JLM | last post by:
I have a table that has fieldA, fieldB, fieldC. I want fieldC=fieldA-fieldB. simple enough. the next record I want to be able to do the same on the new value of fieldC. I can do this with SAP...
1
by: jlm | last post by:
I have a form which feeds table (TblEmpLeave) of Employee Leave Time (time taken off for Administrative, Annual, Sick, Compensation leave). I have EmpID, LeaveDate, LeaveType, LeaveHours fields on...
2
by: celsius | last post by:
Hi folks, Al Bowers wrote this program on comp.lang.c Date: 2001-07-09 13:41:58 PST #include <stdio.h> int isleap (unsigned yr); static unsigned months_to_days (unsigned month); static long...
3
by: Ron Vecchi | last post by:
I need to calculate the age of a person based on a DateTime BirthDate I was thinking TimeSpan ts = DateTime.Now - BirthDate; //I can get the days but not years. // I could check each...
4
realin
by: realin | last post by:
hi guys.. I have made a function which counts the numbers of days or hours or minutes from the current datetime to the give datetime.. but i am confused while displaying number of days along with...
8
by: =?Utf-8?B?QWw=?= | last post by:
I am working in vb2005. how can I calculate business days (not including holidays and weekends) between 2 dates? thanks Al
5
by: jjkeeper | last post by:
G'day, I'm currently working on an annual leave database for the company, so far so good, till they want the database to be able to identify public holidays and prevent reducing the employee's...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.