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

Hi

I have a download from a generic program that sends dates as follows
20061230 and I need to automatically change the formating to read 30/12/2006
so that I can perform other calculations on the date, how can I do this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Format problem

Steve,
You could do something similar with an Excel formula also:

Public Function ConvDate(inDate As String) As Date
ConvDate = DateSerial(Left(inDate, 4), Mid(inDate, 5, 2), Right(inDate, 2))
End Function

NickHK

"Steve Wood" wrote in message
...
Hi

I have a download from a generic program that sends dates as follows
20061230 and I need to automatically change the formating to read

30/12/2006
so that I can perform other calculations on the date, how can I do this?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 196
Default Format problem

Steve

You could also simply try:

=TEXT(A1+0,"0000-00-00")+0

and format the cell as

dd/mm/yyyy

Richard


NickHK wrote:

Steve,
You could do something similar with an Excel formula also:

Public Function ConvDate(inDate As String) As Date
ConvDate = DateSerial(Left(inDate, 4), Mid(inDate, 5, 2), Right(inDate, 2))
End Function

NickHK

"Steve Wood" wrote in message
...
Hi

I have a download from a generic program that sends dates as follows
20061230 and I need to automatically change the formating to read

30/12/2006
so that I can perform other calculations on the date, how can I do this?


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
Excel Format Problem - Date Overrides Format Mary Excel Discussion (Misc queries) 5 February 10th 10 05:49 AM
General Format to Custom format problem KELC-F/A Excel Discussion (Misc queries) 1 May 2nd 08 09:51 PM
if format problem wtrbb Excel Worksheet Functions 9 November 30th 07 08:20 PM
Format Problem randy Excel Programming 3 August 25th 06 02:35 PM
Format problem Gary Excel Discussion (Misc queries) 4 July 3rd 05 02:57 PM


All times are GMT +1. The time now is 03:15 AM.

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

About Us

"It's about Microsoft Excel"