#1   Report Post  
Posted to microsoft.public.excel.misc
nick
 
Posts: n/a
Default Date formatting

Hi,

How do i convert a standard date in to yyyymmdd format? I have to use a
function to do this. I cannot just change the format of the cell. Can anyone
help me with this? Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ardus Petus
 
Posts: n/a
Default Date formatting

Why can't you change the format of the cell?

if you want to change yyyymmdd text into date data, use the following:
=DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2))

HTH
--
AP

"nick" a écrit dans le message de news:
...
Hi,

How do i convert a standard date in to yyyymmdd format? I have to use a
function to do this. I cannot just change the format of the cell. Can
anyone
help me with this? Thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave O
 
Posts: n/a
Default Date formatting

When you say "cannot just change the format of the cell", I'm guessing
you have some kind of requirement to deliver the data somewhere else
and need to show the actual numbers, instead of the Excel-readable
date. Is that correct?

Assuming you have an Excel-readabel date in cell A1, try this formula:
=YEAR(A1)&TEXT(MONTH(A1),"00")&TEXT(DAY(A1),"00")

  #4   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default Date formatting

If A1 contains a date then:

=TEXT(A1,"yyyymmdd")
--
Gary's Student


"nick" wrote:

Hi,

How do i convert a standard date in to yyyymmdd format? I have to use a
function to do this. I cannot just change the format of the cell. Can anyone
help me with this? Thanks

  #5   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default Date formatting

You can convert an Excel DATE to a TEXT display with.......

=TEXT(A1,"yyyymmdd")

But the result is TEXT, no longer a DATE for Excel.

Vaya con Dios,
Chuck, CABGx3




"nick" wrote:

Hi,

How do i convert a standard date in to yyyymmdd format? I have to use a
function to do this. I cannot just change the format of the cell. Can anyone
help me with this? Thanks



  #6   Report Post  
Posted to microsoft.public.excel.misc
Dav
 
Posts: n/a
Default Date formatting


You either format the cell with a custom format of yyyymmdd or apply a
formula to make it appear elsewhere such as =TEXT(A1,"yyyymmdd") but
this turns it into text, it is no longer numeric

Regards

Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=540723

  #7   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default Date formatting

An alternative:

=YEAR(A1)*10000+MONTH(A1)*100+DAY(A1)

and format the cell as General. So if A1 contains =TODAY(), then the
formula will return: 20060510

--
Gary''s Student


"nick" wrote:

Hi,

How do i convert a standard date in to yyyymmdd format? I have to use a
function to do this. I cannot just change the format of the cell. Can anyone
help me with this? Thanks

  #8   Report Post  
Posted to microsoft.public.excel.misc
nick
 
Posts: n/a
Default Date formatting

Thank You all....

"Gary''s Student" wrote:

An alternative:

=YEAR(A1)*10000+MONTH(A1)*100+DAY(A1)

and format the cell as General. So if A1 contains =TODAY(), then the
formula will return: 20060510

--
Gary''s Student


"nick" wrote:

Hi,

How do i convert a standard date in to yyyymmdd format? I have to use a
function to do this. I cannot just change the format of the cell. Can anyone
help me with this? Thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with formatting the date. Lee Excel Discussion (Misc queries) 6 February 24th 06 07:27 PM
formatting a cell to display the correct date. Lee Excel Discussion (Misc queries) 1 February 23rd 06 04:04 PM
Can a date be used for conditional formatting? Stevie P Excel Worksheet Functions 2 September 27th 05 09:42 PM
Conditional Formatting, date. DissentChick Excel Worksheet Functions 2 July 20th 05 03:37 PM
Despite formatting a column in Excel 2002 worksheet as Short Date. Pete Whalley Excel Discussion (Misc queries) 2 February 7th 05 06:17 PM


All times are GMT +1. The time now is 06:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"