how do I format a date from yyyymmdd to mmddyyyy in access?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I know it needs a mid expression , left expression and right expression. but
I can't seem to string the expression together without errors.
 
Heather said:
I know it needs a mid expression , left expression and right
expression. but I can't seem to string the expression together
without errors.

Easier would be...

Format(CDate([yourfield]), "mmddyyyy")
 
I know it needs a mid expression , left expression and right expression. but
I can't seem to string the expression together without errors.

Is this a Date/Time field, or a Text field? A Date/Time field -
regardless of format - is actually stored as a number, a count of days
and fractions of a day since midnight, December 30, 1899. You can
change the Format property of the field from yyyymmdd to mmddyyyy (or
any other format you like) without affecting what's actually stored.

If it's a Text field, you can use

Mid([textdate], 5, 4) & Left([textdate], 4)


John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top