|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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? |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Selecting date range from database (access 2000) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|