ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Format Today function (https://www.excelbanter.com/excel-programming/316073-format-today-function.html)

Grant

Format Today function
 
I've seen/done this before but I can't remember how to do it. I need to
dormat Today from 11/8/2004 to 110804. I can di it by going to
FormatCellsCustom then typing the formula. But I thought there was a way
to do it by specifing the format (MM,DD,YY) somwhoe nested in Today.

Any ideas.

Thanks



Jake Marx[_3_]

Format Today function
 
Hi Grant,

Grant wrote:
I've seen/done this before but I can't remember how to do it. I need
to dormat Today from 11/8/2004 to 110804. I can di it by going to
FormatCellsCustom then typing the formula. But I thought there was
a way to do it by specifing the format (MM,DD,YY) somwhoe nested in
Today.


You can use the TEXT worksheet function to format the date:

=TEXT(TODAY(),"mmddyy")

Keep in mind that when you do this, you're changing the actual value of the
cell to a string containing "110804". When you apply formatting to the cell
itself, you are keeping the date value and changing only its appearance. So
which way you do this really depends on whether you're going to be using the
value for date calculations or not.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Grant

Format Today function
 
Thanks Jake,

The string value is what I was looking for.


"Jake Marx" wrote in message
...
Hi Grant,

Grant wrote:
I've seen/done this before but I can't remember how to do it. I need
to dormat Today from 11/8/2004 to 110804. I can di it by going to
FormatCellsCustom then typing the formula. But I thought there was
a way to do it by specifing the format (MM,DD,YY) somwhoe nested in
Today.


You can use the TEXT worksheet function to format the date:

=TEXT(TODAY(),"mmddyy")

Keep in mind that when you do this, you're changing the actual value of
the cell to a string containing "110804". When you apply formatting to
the cell itself, you are keeping the date value and changing only its
appearance. So which way you do this really depends on whether you're
going to be using the value for date calculations or not.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]





All times are GMT +1. The time now is 04:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com