Group:  Microsoft Access » microsoft.public.access.queries
Thread: Help! How do you calculate days within two date fields

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Help! How do you calculate days within two date fields
Rose 30.09.2006 04:14:01
I am working with a Microsoft Access Database helping a non profit
organization try to figure out how many nights in a month people are staying
in there shelter. I have two fields a Check In Date and Check Out Date
Field. Therefore to figure out the nights a person stayed, I minus the Check
Out by the Check In Date.

The problem is if they check in the prior month, let’s say February and
checked out in March, How I can I calculate just the days in March. The
other problem is if they checked in March and have not checked out yet (null
field), how do I calculate the number of days in March. This is time
sensitive any assistance anyone can give is greatly appreciated.

Re: Help! How do you calculate days within two date fields
"Duane Hookom" <DuaneAtNoSpanHookomDotNet> 30.09.2006 04:33:02
At least one answer in tables design where you asked the same question.
Please post your questions to a single news group.

--
Duane Hookom
MS Access MVP

"Rose" <Rose[ at ]discussions.microsoft.com> wrote in message
news:C60FA2D7-E021-4668-A845-8A8F795979E9[ at ]microsoft.com...
[Quoted Text]
>I am working with a Microsoft Access Database helping a non profit
> organization try to figure out how many nights in a month people are
> staying
> in there shelter. I have two fields a Check In Date and Check Out Date
> Field. Therefore to figure out the nights a person stayed, I minus the
> Check
> Out by the Check In Date.
>
> The problem is if they check in the prior month, let's say February and
> checked out in March, How I can I calculate just the days in March. The
> other problem is if they checked in March and have not checked out yet
> (null
> field), how do I calculate the number of days in March. This is time
> sensitive any assistance anyone can give is greatly appreciated.
>


Re: Help! How do you calculate days within two date fields
MGFoster <me[ at ]privacy.com> 30.09.2006 19:13:50
Rose wrote:
[Quoted Text]
> I am working with a Microsoft Access Database helping a non profit
> organization try to figure out how many nights in a month people are staying
> in there shelter. I have two fields a Check In Date and Check Out Date
> Field. Therefore to figure out the nights a person stayed, I minus the Check
> Out by the Check In Date.
>
> The problem is if they check in the prior month, let’s say February and
> checked out in March, How I can I calculate just the days in March. The
> other problem is if they checked in March and have not checked out yet (null
> field), how do I calculate the number of days in March. This is time
> sensitive any assistance anyone can give is greatly appreciated.
>

It wud help if you'd show the table structure you are working with and
some sample data. Any solution anybody provides will be only guess work.
--
MGFoster:::mgf
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net