Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Dimmer
 
Posts: n/a
Default Date conversion issue... again

Hello all,

I have a file that contains dates. I know that for example "12.10.2004"
means "December 10th, 2005", however Excel treats as "Oct. 12th 2004".
Nothing works: converting the format of the cells doen't help, the
TEXT(A1;"mm.dd.yyyy") doesn't do anything because it works on the serial
number instead

Any suggestions?

thanks a lot
  #2   Report Post  
R.VENKATARAMAN
 
Posts: n/a
Default

in some other empty cell (without any formt) type this
=(SUBSTITUTE(A1,".","/"))+0
you may get the date number
format it as you like

do you get what you want;.


Dimmer wrote in message
...
Hello all,

I have a file that contains dates. I know that for example "12.10.2004"
means "December 10th, 2005", however Excel treats as "Oct. 12th 2004".
Nothing works: converting the format of the cells doen't help, the
TEXT(A1;"mm.dd.yyyy") doesn't do anything because it works on the serial
number instead

Any suggestions?

thanks a lot



  #3   Report Post  
cmart02
 
Posts: n/a
Default

Hi,

You can use the following function to convert the values:

Function ccDate(myDate As Date) As Date

dDate = CStr(myDate)

myValues = Split(dDate, "/")

myMonth = CInt(myValues(0))
myDay = CInt(myValues(1))
myYear = CInt(myValues(2))

ccDate = DateSerial(myYear, myMonth, myDay)

End Function


I am recruting new members for my forum below... The site went live this
weekend and if you wish to take part, please, join me there so that we can
exchange some ideas.

--
Regards
Robert
Find me at www.msofficegurus.com - be part of it!

  #4   Report Post  
cmart02
 
Posts: n/a
Default

I only noticed that you used a "." instead of "/" in the date. In this case,
change the following line:

myValues = Split(dDate, ".")

Alternatively, you can use an extra argument so that you can indicate the
separator.


--
Regards
Robert
Find me at www.msofficegurus.com - be part of it!


"cmart02" wrote:

Hi,

You can use the following function to convert the values:

Function ccDate(myDate As Date) As Date

dDate = CStr(myDate)

myValues = Split(dDate, "/")

myMonth = CInt(myValues(0))
myDay = CInt(myValues(1))
myYear = CInt(myValues(2))

ccDate = DateSerial(myYear, myMonth, myDay)

End Function


I am recruting new members for my forum below... The site went live this
weekend and if you wish to take part, please, join me there so that we can
exchange some ideas.

--
Regards
Robert
Find me at www.msofficegurus.com - be part of it!

  #5   Report Post  
Dimmer
 
Posts: n/a
Default

Hi
I never used such a function before... how do I proceed?...

thanks

"cmart02" wrote:

I only noticed that you used a "." instead of "/" in the date. In this case,
change the following line:

myValues = Split(dDate, ".")

Alternatively, you can use an extra argument so that you can indicate the
separator.


--
Regards
Robert
Find me at www.msofficegurus.com - be part of it!


"cmart02" wrote:

Hi,

You can use the following function to convert the values:

Function ccDate(myDate As Date) As Date

dDate = CStr(myDate)

myValues = Split(dDate, "/")

myMonth = CInt(myValues(0))
myDay = CInt(myValues(1))
myYear = CInt(myValues(2))

ccDate = DateSerial(myYear, myMonth, myDay)

End Function


I am recruting new members for my forum below... The site went live this
weekend and if you wish to take part, please, join me there so that we can
exchange some ideas.

--
Regards
Robert
Find me at www.msofficegurus.com - be part of it!



  #6   Report Post  
Roger Govier
 
Posts: n/a
Default

you could try
=DATE(RIGHT(A1,4),LEFT(A1,2),MID(A1,4,2))
and format the cell with the date format you prefer

--
Regards
Roger Govier
"Dimmer" wrote in message
...
Hello all,

I have a file that contains dates. I know that for example "12.10.2004"
means "December 10th, 2005", however Excel treats as "Oct. 12th 2004".
Nothing works: converting the format of the cells doen't help, the
TEXT(A1;"mm.dd.yyyy") doesn't do anything because it works on the serial
number instead

Any suggestions?

thanks a lot



  #7   Report Post  
RagDyeR
 
Posts: n/a
Default

Check out what format is in your Windows settings.

<Start <ControlPanel <Regional Settings

--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

"Dimmer" wrote in message
...
Hello all,

I have a file that contains dates. I know that for example "12.10.2004"
means "December 10th, 2005", however Excel treats as "Oct. 12th 2004".
Nothing works: converting the format of the cells doen't help, the
TEXT(A1;"mm.dd.yyyy") doesn't do anything because it works on the serial
number instead

Any suggestions?

thanks a lot


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
imported impromtu report date issue - fix by format or formula Todd F. Excel Discussion (Misc queries) 3 July 7th 05 09:57 PM
Date Conversion JD McLeod Excel Worksheet Functions 1 June 17th 05 01:07 PM
Date conversion issue "^" symbol Shannon Excel Discussion (Misc queries) 1 May 4th 05 12:25 AM
unwanted number to date conversion while pasting data from web Jacek Excel Worksheet Functions 1 February 24th 05 02:59 PM
Date issue between Windows and Macintosh version dlg1967 Excel Discussion (Misc queries) 4 January 19th 05 03:51 PM


All times are GMT +1. The time now is 04:22 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"