Formatting today()

L

LurfysMa

I want to generate the text: "Printed on mm/dd/yy." where "mm/dd/yy"
is replaced by the value from today().

If I put "today()" in a cell by itself, it displays as 12/24/06.

But if I enter this code:

=CONCATENATE("Printed on ",TODAY())

it displays as: "Printed on 39075.".

The only solution I could come up with is:

=CONCATENATE("Printed on
",MONTH(TODAY()),"/",DAY(TODAY()),"/",YEAR(TODAY()),".")

which is ugly.

Is there no "format" function that would allow me to write something
like this:

=CONCATENATE("Printed on ",FORMAT(TODAY(),"U"))

where the "U" is short for USA format (mm/dd/yy)?

Ideally, the Today function would have accepted a format parameter,
like =today("U").
 
G

George Gee

Why not have this as a Header/Footer.
File > Page setup > Header/Footer > Custom Footer
Type: "Printed on" (no quotes) then click the calendar icon.
This should become: Printed on & [Date]
Format as required.

George Gee
 
P

Paul B

LurfysMa, something like this
="Printed on: " & TEXT(TODAY(), "MM/DD/YY")

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 
L

LurfysMa

LurfysMa, something like this
="Printed on: " & TEXT(TODAY(), "MM/DD/YY")

Perfect. The Text() function is what I was looking for. Thanks very
much.

I guess it would be too much trouble to have that show up in the help
search results for "format".
 
L

LurfysMa

Why not have this as a Header/Footer.
File > Page setup > Header/Footer > Custom Footer
Type: "Printed on" (no quotes) then click the calendar icon.
This should become: Printed on & [Date]
Format as required.

Thanks. That would work, but I don't want it in the footer.
 
G

Gord Dibben

="Printed on " &TEXT(TODAY(),"mm/dd/yy")

Don't need to concatenate the cells.


Gord Dibben MS Excel MVP
 
P

Paul B

Your welcome

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 

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