Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Date Format
How can I get Excel (2003) to display a date as YYYYMMDD with no hyphens,
periods or dashes between the YYYY the MM and the DD? I still need the cell to be recognized as a date. Thanks |
#2
|
|||
|
|||
FORMAT / CELLS / NUMBER / CUSTOM
yyyymmdd Hope this helped, Gary Brown "Adam1 Chicago" wrote: How can I get Excel (2003) to display a date as YYYYMMDD with no hyphens, periods or dashes between the YYYY the MM and the DD? I still need the cell to be recognized as a date. Thanks |
#3
|
|||
|
|||
format=Cells=Number Tab, select custom and enter
yyyymmdd -- Regards, Tom Ogilvy "Adam1 Chicago" wrote in message ... How can I get Excel (2003) to display a date as YYYYMMDD with no hyphens, periods or dashes between the YYYY the MM and the DD? I still need the cell to be recognized as a date. Thanks |
#4
|
|||
|
|||
Gary,
Thanks -- that get it to the right format. However, I am using the date in this format as an input to a formula in Excel which pulls some data from Bloomberg and I need to somehow transform the date into text, because as long as its VALUE appears as 38398 Bloomberg can't recognize it. It's looking for the text of 20050223 and I am trying to figure out a way to have my Excel figure today's date as usual (=today()) then have a macro to cut and paste that date (which we just formatted as YYYYMMDD) as something that looks the same but now has the additional property of having a value equal to 20050223. Thanks,Adam "Gary Brown" wrote: FORMAT / CELLS / NUMBER / CUSTOM yyyymmdd Hope this helped, Gary Brown "Adam1 Chicago" wrote: How can I get Excel (2003) to display a date as YYYYMMDD with no hyphens, periods or dashes between the YYYY the MM and the DD? I still need the cell to be recognized as a date. Thanks |
#5
|
|||
|
|||
Maybe you can use something like this:
Assuming A1 contains =today(), another cell can contain the correct format your replace all references to A1 with the formala in A1, but the setup would be: =YEAR(A1)&REPT("0",2-LEN(MONTH(A1)))&MONTH(A1)&REPT("0",2-LEN(DAY(A1)))&DAY(A1) This accounts for months with one digit (Jan-Sep) and days 1 thru 9 of the month. It will deliver a text value. -- HansM "Adam1 Chicago" wrote in message ... Gary, Thanks -- that get it to the right format. However, I am using the date in this format as an input to a formula in Excel which pulls some data from Bloomberg and I need to somehow transform the date into text, because as long as its VALUE appears as 38398 Bloomberg can't recognize it. It's looking for the text of 20050223 and I am trying to figure out a way to have my Excel figure today's date as usual (=today()) then have a macro to cut and paste that date (which we just formatted as YYYYMMDD) as something that looks the same but now has the additional property of having a value equal to 20050223. Thanks,Adam "Gary Brown" wrote: FORMAT / CELLS / NUMBER / CUSTOM yyyymmdd Hope this helped, Gary Brown "Adam1 Chicago" wrote: How can I get Excel (2003) to display a date as YYYYMMDD with no hyphens, periods or dashes between the YYYY the MM and the DD? I still need the cell to be recognized as a date. Thanks |
#6
|
|||
|
|||
Display only?
FormatCellsNumberCustom YYYYMMDD 23/2/2005 will display as 20050223 Perhaps you have asked the wrong question? If not what you want, please re-post. Gord Dibben Excel MVP On Wed, 23 Feb 2005 11:09:06 -0800, "Adam1 Chicago" wrote: How can I get Excel (2003) to display a date as YYYYMMDD with no hyphens, periods or dashes between the YYYY the MM and the DD? I still need the cell to be recognized as a date. Thanks |
#7
|
|||
|
|||
Try =Text(today(),"yyyymmdd")
-- Regards, Fred Please reply to newsgroup, not e-mail "Adam1 Chicago" wrote in message ... Gary, Thanks -- that get it to the right format. However, I am using the date in this format as an input to a formula in Excel which pulls some data from Bloomberg and I need to somehow transform the date into text, because as long as its VALUE appears as 38398 Bloomberg can't recognize it. It's looking for the text of 20050223 and I am trying to figure out a way to have my Excel figure today's date as usual (=today()) then have a macro to cut and paste that date (which we just formatted as YYYYMMDD) as something that looks the same but now has the additional property of having a value equal to 20050223. Thanks,Adam "Gary Brown" wrote: FORMAT / CELLS / NUMBER / CUSTOM yyyymmdd Hope this helped, Gary Brown "Adam1 Chicago" wrote: How can I get Excel (2003) to display a date as YYYYMMDD with no hyphens, periods or dashes between the YYYY the MM and the DD? I still need the cell to be recognized as a date. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date Format Question | Excel Discussion (Misc queries) | |||
Format cells as date | Excel Discussion (Misc queries) | |||
USING THE DATE FORMAT IN EXCEL | Excel Discussion (Misc queries) | |||
Date format collapses diagram | Excel Discussion (Misc queries) | |||
Problem with Date format from VBA code | Excel Discussion (Misc queries) |