In query design view right click on the relevant date column and select Properties. There is a format field into which you can type a format string or select from a drop down list. For example, you could choose the windows long date format to make the query portable across different countries.
PHV's approach will work but I have come to grief because I forget it delivers text. This means you cannot sort the results by that date reliably. For example I get a text sort of
31/01/2004
31/03/2001
because 01 comes before 03 but an ascending date sort should put the year 2001 first.
In practice I get into trouble with embedded queries in Excel workbooks using Microsoft query - my example was a simplification. Apart from sorting which applies equally in Excel there are issues such as date arithmetic failing such as turning a birthdate into an age.
In a pure Access context my technique controls the formatting without changing the datatype. It is also more robust in an international group.
Finally the use of a calculated field means that the query is not updateable on that column although that may sometimes be an advantage.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.