SunQuest
           ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old July 15th, 2004, 05:48 AM
chrisgreen chrisgreen is offline
Webmaster
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 23 chrisgreen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Selecting date range from database (access 2000)

Hi all, does anyone know whether I can use:-

Code:
SELECT * from users
WHERE Lastlogin_Time between '#TimeFormat(TimeAdd(0,-30, 0, Now()), "HH:MM:SS")#' AND '#TimeFormat(now(), "HH:MM:SS")#'


as an sql statement for an access database. It doesn't throw an error however produces no results.

The data in the field lastlogin_time is in the format:-
6:17:47 PM.

And the data in the field lastlogin_date is in the format:-
7/14/2004

NB. TimeAdd() is a custom UDF that uses the dateadd() function.

Can anyone see any obvious problems?

Reply With Quote
  #2  
Old July 15th, 2004, 10:07 AM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,626 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 10 h 6 m 34 sec
Reputation Power: 53
You probably need to be using the ODBC-specific date functions like createODBCDate(). See if that helps.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
  #3  
Old July 15th, 2004, 11:56 AM
chrisgreen chrisgreen is offline
Webmaster
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 23 chrisgreen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Solution

Thanks for the help. I managed to sort out the problem with a combination of your advice using createodbcdate() and createodbctime() and removing the quotes that i had put in.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Selecting date range from database (access 2000)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway