Change format of a date in an access table

  • Thread starter Thread starter Sally
  • Start date Start date
S

Sally

Hello,

Could someone tell mw how I might change the format of a
date in a query, for instance I have a date in the format
CCYYMMDD EG 20030826, however I need to convert them in a
query to 26/08/2003 which makes analysis easier.

Please can someone help.

Thanks

Sally
 
Hi Sally,

If this is a date field, just format it (using the Format property of
the column on the query design grid, or the Format() function in a
calculated field, depending on just what you want to achieve).

If a text field, you could do something like this (XX is the name of the
field):
fXX: Right([XX],2) & "/" & Mid([XX],5,2) & "/" & Left([XX],4)

If a numeric field, you could just replace the [XX] in the above
expression with
Format([XX],"00000000")
 
Back
Top