RE: getting query results based on day (solution found)

2000-10-18 Thread Dominic J. Doucet-Lorang

I found a solution.  Instead of using CreateODBCDateTime (Now()) when I
create the record I use CreateODBCDate (Now().  Then use CreateODBCDate
(Now()) in my query page.

Thanks for the help everyone.

Dominic

-Original Message-
From: Dominic J. Doucet-Lorang [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 18, 2000 2:14 PM
To: CF-Talk
Subject: getting query results based on day


I am trying to pull information from a database table based upon the date
and a couple of other items.  I have tried to use a query wher I comparied
the date column in the table with  now() but it gets no results. the query
looks like this:

select distinct forsikring.*,kunde.*
from forsikring, kunde
where  forsikring.refnr = #refnr2# AND forsikring.id = kunde.id and dos =
Now()

It will get results if I remove the dos = Now()
It needs to just get the records if the date is today also.


Dominic



Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: getting query results based on day

2000-10-18 Thread Dominic J. Doucet-Lorang

dos is a date/time.  I only need to compare the date part.


-Original Message-
From: David Shadovitz [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 18, 2000 3:03 PM
To: CF-Talk
Subject: Re: getting query results based on day


Dominic,

There are two issues here:

First, is "dos" a date, or a date/time?  Now() is a date/time, so it's
not likely you'll match any entries down to the current time.  If dos is
just a date, you'd need to manipulate Now() to get the date part of it.
If dos includes the time, you'll need to test on the difference between
dos and Now().

Second, you need to work in ODBC dates/times.

Can you show us how you insert dos?

-David

On Wed, 18 Oct 2000 14:13:38 +0200 "Dominic J. Doucet-Lorang"
<[EMAIL PROTECTED]> writes:
> I am trying to pull information from a database table based upon the
> date
> and a couple of other items.  I have tried to use a query wher I
> comparied
> the date column in the table with  now() but it gets no results. the
> query
> looks like this:
>debug>
>   select distinct forsikring.*,kunde.*
>   from forsikring, kunde
>   where  forsikring.refnr = #refnr2# AND forsikring.id =
> kunde.id and dos =
> Now()
>   
> It will get results if I remove the dos = Now()
> It needs to just get the records if the date is today also.
>
>
> Dominic
>
>
-
---
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or
> send a message with 'unsubscribe' in the body to
> [EMAIL PROTECTED]


YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk!  For your FREE software, visit:
http://dl.www.juno.com/get/tagj.


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: getting query results based on day

2000-10-18 Thread Dominic J. Doucet-Lorang

this is the code I used to create the record.






Dominic J. Doucet-Lorang

-Original Message-
From: David Shadovitz [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 18, 2000 3:03 PM
To: CF-Talk
Subject: Re: getting query results based on day


Dominic,

There are two issues here:

First, is "dos" a date, or a date/time?  Now() is a date/time, so it's
not likely you'll match any entries down to the current time.  If dos is
just a date, you'd need to manipulate Now() to get the date part of it.
If dos includes the time, you'll need to test on the difference between
dos and Now().

Second, you need to work in ODBC dates/times.

Can you show us how you insert dos?

-David

On Wed, 18 Oct 2000 14:13:38 +0200 "Dominic J. Doucet-Lorang"
<[EMAIL PROTECTED]> writes:
> I am trying to pull information from a database table based upon the
> date
> and a couple of other items.  I have tried to use a query wher I
> comparied
> the date column in the table with  now() but it gets no results. the
> query
> looks like this:
>debug>
>   select distinct forsikring.*,kunde.*
>   from forsikring, kunde
>   where  forsikring.refnr = #refnr2# AND forsikring.id =
> kunde.id and dos =
> Now()
>   
> It will get results if I remove the dos = Now()
> It needs to just get the records if the date is today also.
>
>
> Dominic
>
>
-
---
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or
> send a message with 'unsubscribe' in the body to
> [EMAIL PROTECTED]


YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk!  For your FREE software, visit:
http://dl.www.juno.com/get/tagj.


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



Re: getting query results based on day

2000-10-18 Thread David Shadovitz

Dominic,

There are two issues here:

First, is "dos" a date, or a date/time?  Now() is a date/time, so it's
not likely you'll match any entries down to the current time.  If dos is
just a date, you'd need to manipulate Now() to get the date part of it. 
If dos includes the time, you'll need to test on the difference between
dos and Now().

Second, you need to work in ODBC dates/times.

Can you show us how you insert dos?

-David

On Wed, 18 Oct 2000 14:13:38 +0200 "Dominic J. Doucet-Lorang"
<[EMAIL PROTECTED]> writes:
> I am trying to pull information from a database table based upon the 
> date
> and a couple of other items.  I have tried to use a query wher I 
> comparied
> the date column in the table with  now() but it gets no results. the 
> query
> looks like this:
>debug>
>   select distinct forsikring.*,kunde.*
>   from forsikring, kunde
>   where  forsikring.refnr = #refnr2# AND forsikring.id = 
> kunde.id and dos =
> Now()
>   
> It will get results if I remove the dos = Now()
> It needs to just get the records if the date is today also.
> 
> 
> Dominic
> 
>
-
---
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or 
> send a message with 'unsubscribe' in the body to 
> [EMAIL PROTECTED]


YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk!  For your FREE software, visit:
http://dl.www.juno.com/get/tagj.

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: getting query results based on day

2000-10-18 Thread Stewart McGowan

Dominic,

I'd check the datatypes are consistant and then check for your dB if you
need to cast or convert the now() function

Regards

Stew

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]