need to convert microsoft date to yyyymmdd

P

pm

I have a file in which I concatenate two fields, the vendor and the date.

it shows as 40255-3042
I would like 20100318-3042

Here's my formula: =concatenate(O2,"-",B2)

Can anyone help me format the date field I am picking up in column O2?
 
D

Dave Peterson

=text(o2,"yyyymmdd")&"-"&b2
or maybe...
=text(o2,"yyyymmdd")&"-"&text(b2,"0000")

To make sure that that vendor is 4 digits, too.
 
P

pm

That works excellent, thanks! I tried using the text function too, but
couldn't get it to work. Thanks again for your help!
 

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