English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I set up a contact management database that will show by appointments on a daily basis. What formula would I use in the date column to spefiy to only pull the current days information?
I tried using the "NOW()" formula, but it wouldn't show todays information.

I appreciate your help!

2007-04-26 03:06:39 · 4 answers · asked by Kristi 2 in Computers & Internet Programming & Design

4 answers

select things
from data_table
where date_column=Date()

2007-04-26 03:16:01 · answer #1 · answered by AnalProgrammer 7 · 1 0

As previous people have pointed out put the Date() function into the query grid to pull today's records. If you really want to use the Now() function - which by design includes the time as well, you'll have to limit it to only the date. As such:

Format(Now(),"Short Date")

This will accomplish the same thing as the Date() function.

Good luck!

2007-04-26 03:48:54 · answer #2 · answered by SquirrelNutz 4 · 1 0

NOW() gives you the current date AND time so you only get records for the moment you ran the query.

DATE() will give you all the records on todays date.

You might also check out the TODAY() function, but I think DATE() is what you want

hope that helps

2007-04-26 03:21:05 · answer #3 · answered by rod 6 · 2 0

try this ex: SELECT * FROM table_name WHERE (Date = GETDATE())

2007-04-26 04:10:04 · answer #4 · answered by azmath_shamrad 2 · 0 0

fedest.com, questions and answers