+ Reply to Thread
Results 1 to 7 of 7

Concatenate dates - getting odd result

  1. #1
    Registered User
    Join Date
    03-15-2007
    Posts
    50

    Concatenate dates - getting odd result

    I have dates in 2 columns. I want to concatenate those onto a form as follows:

    D2 4/14/07
    E2 4/15/07

    F2 =CONCATENATE(TEXT(D2,"dd/mm/yy")," to ",TEXT(E2,"dd/mm/yy"))

    What I'm getting as a result is "30/03/07 to 02/04/07"

    I've tried reformatting the columns to date, test & general and I'm sure it's something stupid that I'm missing, but I can't figure it out.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    are d2 and e2 numbers or text?
    ( just to make sure, try =d2&"to"&e2)

  3. #3
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi

    I've just changed the dates in D2 (14/04/07) & E2 (15/04/07) and it works fine

    = 14/04/07 to 15/04/07
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  4. #4
    Registered User
    Join Date
    03-15-2007
    Posts
    50
    I entered the date in D2 & E2 as dates (american format mm/dd/yy) I tried using the simple concatenate (D2&"to"&E2) and I got the serial number format of the dates (39171 to 39174)

    Does Excel expect the dates to be in a European format? (dd/mm/yy)

  5. #5
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    It shouldn't matter, take a look at attached
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-15-2007
    Posts
    50
    Thanks for the file. I couldn't see any differences in my coding and couldn't get it to work so I just scrubbed the entire page and re-wrote it. It's working now, but I sure can't figure out what I did to mess it up in the first place.

    Thanks for the help

  7. #7
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Glad you got it sorted out anyway - thanks for the feedback

+ 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