Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Date format issue

Hi,

I have a problem about date format transfering . For
example, one column containing the date data in the
format like "20040415" , now I want to change it to the
format like "04/15/2004". As always,thanks so much in
advance.

Meme

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Date format issue

Is that a date or a number? If it is a date, just change the format
(FormatCells).

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Meme" wrote in message
...
Hi,

I have a problem about date format transfering . For
example, one column containing the date data in the
format like "20040415" , now I want to change it to the
format like "04/15/2004". As always,thanks so much in
advance.

Meme



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Date format issue

It is a text format like '20040415, not a number.
Thanks

-----Original Message-----
Is that a date or a number? If it is a date, just change

the format
(FormatCells).

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Meme" wrote in

message
...
Hi,

I have a problem about date format transfering . For
example, one column containing the date data in the
format like "20040415" , now I want to change it to the
format like "04/15/2004". As always,thanks so much in
advance.

Meme



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default Date format issue

=DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2))

Meme wrote:
Hi,

I have a problem about date format transfering . For
example, one column containing the date data in the
format like "20040415" , now I want to change it to the
format like "04/15/2004". As always,thanks so much in
advance.

Meme

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Date format issue

20040415 stored in a cell is either a string, or the number 10,020,415


Dim dDate as Date
sStr = activeCell.Text
dDate = DateValue(right(sStr,2) &"/" & Mid(sStr,5,2) & "/" & Left(sStr,4))

--
Regards,
Tom Ogilvy


"Meme" wrote in message
...
Hi,

I have a problem about date format transfering . For
example, one column containing the date data in the
format like "20040415" , now I want to change it to the
format like "04/15/2004". As always,thanks so much in
advance.

Meme





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
Please help....Date Format issue SandyW Excel Discussion (Misc queries) 1 January 7th 09 07:29 PM
Date format issue CindyLF1 New Users to Excel 3 June 12th 06 06:18 PM
DATE FORMAT issue [email protected] Excel Worksheet Functions 1 February 8th 06 07:52 AM
Date format issue LadyDoe Excel Worksheet Functions 1 November 17th 05 07:54 AM
Another Date Format issue Wayne Nelson Excel Programming 1 December 4th 03 06:27 AM


All times are GMT +1. The time now is 03:23 PM.

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"