Add zeros

E

EllenM

Hello,
I have a field of text with values such as:
07-55
02-222
03-4444

In an empty field, using an update query, I'd like to make them 8 digits
formatted like "yy-00000, with leading zeros added after the "-", so
07-55 becomes 07-00055
02-222 becomes 02-00222
03-4444 becomes 03-04444

Is there a simple way to do this?

Thanks,
Ellen
 
K

KARL DEWEY

New_Field_Data: Left([YourField], 3) & Right("00000" & Mid([YourField],
InStr([YourField], "-")), 5)
 
E

EllenM

Thanks, Karl. I may have been asking for too much. I was able to do it, but
with many steps.

Ellen ;-D
 
E

EllenM

Thanks, Karl. I may have been asking for too much.
Some numbers looked like this: "03-12045"

I was able to do it, but with many steps.

Ellen ;-D
 

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

Top