Access 2002

  • Thread starter P51merlinflyboy
  • Start date
P

P51merlinflyboy

How do I change the format of a field? For example I want to change
3400060000000000 to 34-00-06-000-000.00-00 I need to create an update query
to modift all records.
 
D

Douglas J Steele

Do you need this permanent, or just for display purposes?

If for display purposes only, you can set the field's Format property to
00\-00\-00\-000\-000\.00\-00

If you need to make the change permanently, you can use an Update query. My
advice would be to add a new field to your table, update the new field from
the existing one, and only delete the existing field once you know
everything's okay.

Your SQL would look something like:

UPDATE MyTable SET MyNewField = Format([MyOldField],
"00\-00\-00\-000\-000\.00\-00")
 
Top