How to get DatePicker to use only Short Date format (No Time)


I have a form that runs a query for a specified date span. I'm using the datepickers to select the dates but they are "inserting" a timestamp as well. The formatting in my table is short date (1/1/2008) is there a way to format this so that I only get date values out of the date picker?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

could you not change your query to format the date in your date span?
or failing that, when you read the date from the datepicker, format it then?
c9k9hAuthor Commented:
Hmmm. Format it in the query? it's straight SQL and looks like this:

sSQL = ""
sSQL = sSQL & "SELECT Sum(GoalPC) AS PC "
sSQL = sSQL & "FROM Goals "
sSQL = sSQL & "WHERE Custodian = '" & Me.cboCustodian & "' And WeekOf Between #" & DFrom & "# And #" & DTo & "#"
Set rsActivity = CurrentDb.OpenRecordset(sSQL)
Me.k7 = rsActivity!PC

what is happening is, it's not including the start date in the query. For instance, if i have records on 10/6/08 i can't set the date picker to that date, it has to be the date before 10/5/08 to capture that data... Perhaps there is something else I could use besides "Between"?
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

c9k9hAuthor Commented:
And if i use regular text boxes to input the date it works fine... so it must not be the "Between" statement.
What about

Between #" & format(dfrom,"short date") & "# and #" & format(dTo,"short date") & "#"

another one I use, long winded but dunno I seem to prefer this way

sSQL = sSQL & "WHERE Custodian = '" & Me.cboCustodian & "' And format(WeekOf Between,'YYYYMMDD') >= " & format(DFrom,"YYYYMMDD") & " And format(WeekOf Between,'YYYYMMDD') <= " & format(dTo,"YYYMMDD")

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
c9k9hAuthor Commented:
Perfect, thank you!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.