Re: time/date format in Access

2007-01-25 Thread John Eubanks
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

Re: time/date format in Access

2006-12-21 Thread Jim Wright
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'}

Re: time/date format in Access

2006-12-21 Thread Claude Schneegans
>>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

Re: time/date format in Access

2006-12-21 Thread Christopher Jordan
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

Re: time/date format in Access

2006-12-21 Thread Jim Wright
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

Re: time/date format in Access

2006-12-21 Thread Christopher Jordan
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: >

Re: time/date format in Access

2006-12-20 Thread Claude Schneegans
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

Re: time/date format in Access

2006-12-20 Thread Charlie Griefer
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

Re: time/date format in Access

2006-12-20 Thread Christopher Jordan
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: > >

RE: time/date format in Access

2006-12-20 Thread Orlini, Robert
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:

Re: time/date format in Access

2006-12-20 Thread Christopher Jordan
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

Re: time/date format in Access

2006-12-20 Thread Jim Wright
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

Re: time/date format in Access

2006-12-20 Thread Jochem van Dieten
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

RE: time/date format in Access

2006-12-20 Thread Orlini, Robert
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

Re: time/date format in Access

2006-12-20 Thread Christopher Jordan
> > -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

RE: time/date format in Access

2006-12-20 Thread Orlini, Robert
- 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

RE: time/date format in Access

2006-12-20 Thread Orlini, Robert
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

Re: time/date format in Access

2006-12-20 Thread Charlie Griefer
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

Re: time/date format in Access

2006-12-20 Thread Christopher Jordan
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

RE: time/date format in Access

2006-12-20 Thread Orlini, Robert
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

RE: time/date format in Access

2006-12-20 Thread Steve Brownlee
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

RE: time/date format in Access

2006-12-20 Thread Steve Brownlee
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.

RE: time/date format in Access

2006-12-20 Thread Orlini, Robert
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

RE: time/date format in Access

2006-12-20 Thread Steve Brownlee
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

time/date format in Access

2006-12-20 Thread Orlini, Robert
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