Link to home
Start Free TrialLog in
Avatar of Fordraiders
FordraidersFlag for United States of America

asked on

populating a combobox with just a date not time from a select query to pass as a varaible into a query

access 2010.
userform
I have a combo box being populated from the below sql statement...below  "rowsource"
SELECT DISTINCT [dbo_t_dispensing_email_audit_history].[Notify_Processed_Date] FROM dbo_t_dispensing_email_audit_history ORDER BY [Notify_Processed_Date];

What I need:
The value being pulled includes a time stamp value such as
6/5/2015 1:21:36 PM

I need the value in the combo box to display just the DISTINCT DATES and NOT THE TIME ALONG WITH IT ?

Thanks
fordraiders
ASKER CERTIFIED SOLUTION
Avatar of Flyster
Flyster
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Fordraiders

ASKER

thanks !
you can also use the DateValue() function to return only the date portion of a date/time field:

SELECT DISINCT DateValue([yourField]) as ProcessDate
FROM yourTable
ORDER BY DateValue([yourField])