Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel date format function?

Status
Not open for further replies.

PeteG

Programmer
Feb 23, 2001
144
GB
Hi,
Is there a simple way of formatting a date in Excel that appears within a function? For example, if I want this to appear in a cell "Date:01-Oct-2005", I'd like to be able to write a function like this ="Date:"&format(now(),'dd-mmm-yyyy'). I could do that in VBA (I think, it's been a while...) but can I do that with an existing Excel function or worksheet functionality? Cheers
 
rather than FORMAT, use the TEXT function

="Date: " & TEXT(Today(),"dd-mmm-yyyy")

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Excellent, thanks for the quick reply
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top