To: CF-Talk
> Subject: Re: time/date format in Access
>
> Oh! Duh... hadn't thought of that. *smack*
>
> In that case:
>
>
> "23", "59", "59")>
>
> (yesterday))>
>
>
> SELECT *
> FROM me
Christopher Jordan wrote:
>
> Results in:
> WHERE timereceived >= {d '2006-12-20'} AND
> timereceived <{d '2006-12-22'}
>
> I haven't tried it, but if the datatype on the field is 'ts' and you're
> trying to compare it with just 'd' (meaning it's holding data like, {ts
> '2006-12-20 13:43:24'}
>>He needed to check for entries in the
database that occurred between midnight yesterday (00:00:00) and
23:59:59 of today. now()-1 doesn't give that sort of control.
Then use CreateODBCDate instead of CreateODBCDateTime.
CreateODBCDate(now()) is equivalent to CreateODBCDateTime ("now() at
time
I don't *think* so (though I could be wrong).
From the original post,Quote:
I have a SQL statement that searches a date/time field in MS Access
which has data such as "12/20/2006 10:02:18 AM".
So it would appear that his data is being stored as a timestamp.
This code:
WHERE timereceived >= #cre
Christopher Jordan wrote:
> Simple: Because CreateODBCDateTime(now()-1) doesn't cover the proper
> time span that he needed to cover. He needed to check for entries in the
> database that occurred between midnight yesterday (00:00:00) and
> 23:59:59 of today. now()-1 doesn't give that sort of co
Simple: Because CreateODBCDateTime(now()-1) doesn't cover the proper
time span that he needed to cover. He needed to check for entries in the
database that occurred between midnight yesterday (00:00:00) and
23:59:59 of today. now()-1 doesn't give that sort of control.
Claude Schneegans wrote:
>
Gee, why not simply use this:
where timereceived between #createODBCDate(now()-1)# and
#createODBCDate(now())#
--
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTEC
Hi Robert:
I harped on it not because it might eventually crash SQL. Yes, those
are reserved words in SQL, but they're -also- reserved words in
ColdFusion. Any built in function name (as well as scope names) are
reserved words in CF and really shouldn't be used as variable names.
It might not be
inal Message-
> From: Christopher Jordan [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 20, 2006 12:51 PM
> To: CF-Talk
> Subject: Re: time/date format in Access
>
> Oh! Duh... hadn't thought of that. *smack*
>
> In that case:
>
>
PM
To: CF-Talk
Subject:Re: time/date format in Access
Oh! Duh... hadn't thought of that. *smack*
In that case:
SELECT *
FROM message_log_20391
WHERE timereceived BETWEEN #Yesterday# AND #Today#
There, give that a go.
Cheers,
Chris
Orlini, Robert wrote:
om: Christopher Jordan [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 20, 2006 11:16 AM
> To: CF-Talk
> Subject: Re: time/date format in Access
>
> Hi Robert,
> I think the problem is that your dates are not in ODBC date format.
>
> Try something lik
You might want to look at using the Access datediff function
SELECT *
FROM message_log_20391
WHERE datediff("d",timereceived,now()) <= 1
Although note that languages aren't consistent as to whether they take
the time part into account with their datediff function (CF does, S
Orlini, Robert wrote:
> I have a SQL statement that searches a date/time field in MS Access
> which has data such as "12/20/2006 10:02:18 AM". I want to display
> dates between the current day and one day behind.
>
> This statement keeps giving me 0 records.
>
>
>
>
>
>
>
How is this go
to ignore/remove the time?
-Original Message-
From: Christopher Jordan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 20, 2006 11:41 AM
To: CF-Talk
Subject: Re: time/date format in Access
Robert, have you looked at the idea I shot out? I really think it will
work for you, and
>
> -Original Message-
> From: Charlie Griefer [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 20, 2006 11:16 AM
> To: CF-Talk
> Subject: Re: time/date format in Access
>
> btw this:
>
>
>
>
>
>
>
>
> is easier done a
-
From: Charlie Griefer [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 20, 2006 11:16 AM
To: CF-Talk
Subject: Re: time/date format in Access
btw this:
is easier done as:
and really (again), using 'month', 'day', and 'year' as var
rom: Christopher Jordan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 20, 2006 11:16 AM
To: CF-Talk
Subject: Re: time/date format in Access
Hi Robert,
I think the problem is that your dates are not in ODBC date format.
Try something like this:
SELECT *
FROM me
nstead
>
>
>
>
> Steve Brownlee
> http://www.fusioncube.net/
>
> -Original Message-
> From: Orlini, Robert [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 20, 2006 11:00 AM
> To: CF-Talk
> Subject: RE: time/date format in A
Hi Robert,
I think the problem is that your dates are not in ODBC date format.
Try something like this:
SELECT *
FROM message_log_20391
WHERE timereceived BETWEEN #Yesterday# AND #Today#
I think this will work for you.
Cheers,
Chris
Orlini, Robert wrote:
> I have a SQL state
Now I get an error on:
-Original Message-
From: Steve Brownlee [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 20, 2006 11:08 AM
To: CF-Talk
Subject:RE: time/date format in Access
Now that I think about it, you may want to use the day of year instead
Steve
Now that I think about it, you may want to use the day of year instead
Steve Brownlee
http://www.fusioncube.net/
-Original Message-
From: Orlini, Robert [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 20, 2006 11:00 AM
To: CF-Talk
Subject: RE: time/date format in Access
Hi Steve
t: RE: time/date format in Access
Hi Steve, thanks, but got a: "dd" is not a valid date/time format.
~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.
Hi Steve, thanks, but got a: "dd" is not a valid date/time format.
-Original Message-
From: Steve Brownlee [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 20, 2006 10:55 AM
To: CF-Talk
Subject: RE: time/date format in Access
Not positive on this, but you
06 10:50 AM
To: CF-Talk
Subject: time/date format in Access
I have a SQL statement that searches a date/time field in MS Access
which has data such as "12/20/2006 10:02:18 AM". I want to display dates
between the current day and one day behind.
This statement keeps givi
I have a SQL statement that searches a date/time field in MS Access which has
data such as "12/20/2006 10:02:18 AM". I want to display dates between the
current day and one day behind.
This statement keeps giving me 0 records.
SELECT * FROM message_log_20391
where timereceived be
25 matches
Mail list logo