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

H

Heather

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

Rick Brandt

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")
 
J

John Vinson

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]
 
Top