How do you calculate a null date?

G

Guest

I am getting to many arguments when I try to input your information. Could
you try it again. I included an example below. Thank You.

Currently I have a query that states Nights:[CheckOutDate]-[CheckInDate].
The problem is if there is no checkout date yet, how can I get it to run
either today or by date input.


Check In Date Check Out Date Nights
09/01/2006 09/05/2006 4
09/10/2006 09/11/2006 1
09/12/2006
 
D

Duane Hookom

It isn't clear what you want for the calculation if the CheckOutDate is
null. You can use the Nz() function like:

Nights: Nz(CheckOutDate,Date()) - CheckInDate
 
G

Guest

Thank You, Thats what I was looking for. Is there a way to also input a date
you want it to calculate the null field by. For example, if 09/30/2006.
--
Rose


Duane Hookom said:
It isn't clear what you want for the calculation if the CheckOutDate is
null. You can use the Nz() function like:

Nights: Nz(CheckOutDate,Date()) - CheckInDate


--
Duane Hookom
MS Access MVP

Rose said:
I am getting to many arguments when I try to input your information. Could
you try it again. I included an example below. Thank You.

Currently I have a query that states Nights:[CheckOutDate]-[CheckInDate].
The problem is if there is no checkout date yet, how can I get it to run
either today or by date input.


Check In Date Check Out Date Nights
09/01/2006 09/05/2006 4
09/10/2006 09/11/2006 1
09/12/2006
 
D

Duane Hookom

Nights: Nz(CheckOutDate,Nz([Enter another Date],Date())) - CheckInDate

--
Duane Hookom
MS Access MVP

Rose said:
Thank You, Thats what I was looking for. Is there a way to also input a
date
you want it to calculate the null field by. For example, if 09/30/2006.
--
Rose


Duane Hookom said:
It isn't clear what you want for the calculation if the CheckOutDate is
null. You can use the Nz() function like:

Nights: Nz(CheckOutDate,Date()) - CheckInDate


--
Duane Hookom
MS Access MVP

Rose said:
I am getting to many arguments when I try to input your information.
Could
you try it again. I included an example below. Thank You.

Currently I have a query that states
Nights:[CheckOutDate]-[CheckInDate].
The problem is if there is no checkout date yet, how can I get it to
run
either today or by date input.


Check In Date Check Out Date Nights
09/01/2006 09/05/2006 4
09/10/2006 09/11/2006 1
09/12/2006
 
G

Guest

Thank you so much. You have been a great help!
--
Rose


Duane Hookom said:
Nights: Nz(CheckOutDate,Nz([Enter another Date],Date())) - CheckInDate

--
Duane Hookom
MS Access MVP

Rose said:
Thank You, Thats what I was looking for. Is there a way to also input a
date
you want it to calculate the null field by. For example, if 09/30/2006.
--
Rose


Duane Hookom said:
It isn't clear what you want for the calculation if the CheckOutDate is
null. You can use the Nz() function like:

Nights: Nz(CheckOutDate,Date()) - CheckInDate


--
Duane Hookom
MS Access MVP

I am getting to many arguments when I try to input your information.
Could
you try it again. I included an example below. Thank You.

Currently I have a query that states
Nights:[CheckOutDate]-[CheckInDate].
The problem is if there is no checkout date yet, how can I get it to
run
either today or by date input.


Check In Date Check Out Date Nights
09/01/2006 09/05/2006 4
09/10/2006 09/11/2006 1
09/12/2006
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top