How to pick the date format as Short Date (dd/mm/yyyy) without the Time in it to be pulled in an Expression?


How to pick the date format as Short Date (dd/mm/yyyy) without the Time in it to be pulled in an Expression?

Although it is formatted on the form as Short Date, I still get the time with it when I build an expression for another Text Box in the same Form.
Also, It is defined in the underlying table as Date/Time formatted as Short Date !

I am interested in dd/mm/yyyy  or  mm/dd/yyyy only for the sake of the table and the Form Expression.

Thanks a lot.
Issa S.Asked:
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.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Format the date in your expression:

Format(YourDateField, "Short Date")


Format(YourDateField, "dd/mm/yyyy")

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
Anders Ebro (Microsoft MVP)Microsoft DeveloperCommented:
cLng() will throw away the time portion. I would be weary of using format if the code is going to continue working with it. Format will use regional settings, while VBA/SQL always expects US format.
Dale FyeOwner, Developing Solutions LLCCommented:
Another option is the DateValue() function, which strips the decimals (time portion) from a date and returns only the date portion.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Gustav BrockCIOCommented:
Keep in mind, that the format is only for display.

So if you wish to retain the value and just apply a format, set the Format property to dd/mm/yyyy and the expression to:


If you wish to strip the time from the value, apply any format you like and use this expression:


If you don't want time to be stored, don't use Now().  Use Date() when populating date fields.  Also, keep in mind that if you use Format(), your date will be converted to a string and henceforth, it will act like a string so NEVER use Format() in a query unless you are expressly formatting a field for export to Excel and you need to control what gets sent.  If you need to format a field on a form or report, use the Format PROPERTY.  That only affects the display.  It does not affect what is stored or how the field is sorted.
Issa S.Author Commented:
Thanks to All of 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.