Query Current Date

Carrie

Active Member
Joined
Nov 20, 2002
Messages
418
How do I get the query to always pull up the current date?

The help button says to put Date() in the criteria line but that doesn't work.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
What I would do is check to make sure that the field in the table is formatted as a Date.

That happened to me, then I changed it to a date and it worked fine.
 
Upvote 0
Hi Carrie,

Say your field name is [MyDateField]. Now change your Field value in Query to DateValue([MyDateField]). And now goto Criteria and use Date().

Now it is working.

Regards
Suat
 
Upvote 0
Sorry I'm so thick but how do I change the Field Value?

_________________
Thanks,

Carrie
This message was edited by Carrie on 2002-12-20 16:29
 
Upvote 0
Hi Carrie,

Just open your Query in design view and then you will see fields in query what you selected (double click on a field in selected table in Query window then you will see it is added into Query Fields below).

Say your field name is MyDateField. Just click that area and change the Text to DateValue([MyDateField]). And then set the Criteria to Date().

I hope I didn't confuse it more.

Suat
 
Upvote 0
You said to just click that area...when I do that it just highlights it...when I right click it I have a choice of build, properties and so on...which do I choose?

I'm sorry but I don't see anything there that says text so that I can change it to date value.

Tell me...am I supposed to put anything inside the parenthesis on "Date ()"

Thanks for your patience.

Carrie
 
Upvote 0
Hi Carrie, Sorry that I forgot to check the board to see your progress.

If you right mouse click and a list appears, choose Zoom. Then type in the information that the other person told you to type and then go down a couple of rows to the criteria and type in date(), do not add the parenthesis.

Let us know if this helped. Its a slow day so I have some time to help you.
 
Upvote 0

Forum statistics

Threads
1,221,497
Messages
6,160,152
Members
451,625
Latest member
sukhman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top