+ Reply to Thread
Results 1 to 7 of 7

Date conversion issue... again

  1. #1
    Dimmer
    Guest

    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. #2
    R.VENKATARAMAN
    Guest

    Re: Date conversion issue... again

    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 <[email protected]> wrote in message
    news:[email protected]...
    > 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. #3
    cmart02
    Guest

    RE: Date conversion issue... again

    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. #4
    cmart02
    Guest

    RE: Date conversion issue... again

    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. #5
    Roger Govier
    Guest

    Re: Date conversion issue... again

    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" <[email protected]> wrote in message
    news:[email protected]...
    > 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




  6. #6
    Dimmer
    Guest

    RE: Date conversion issue... again

    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!
    > >


  7. #7
    RagDyeR
    Guest

    Re: Date conversion issue... again

    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" <[email protected]> wrote in message
    news:[email protected]...
    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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1