+ Reply to Thread
Results 1 to 6 of 6

Day overran month length 2012-10-36

  1. #1
    Registered User
    Join Date
    11-25-2010
    Location
    London, england
    MS-Off Ver
    Excel 2003
    Posts
    5

    Day overran month length 2012-10-36

    Hey all,

    So imported 100k sales figures from Oracle for Oct and Nov but the day overran and month didn't change.

    EX: 2012-10-32 instead of 2012-11-01. So I now have dates ranging from 2012-10-01 to 2012-10-59.
    So trying to do date analysis is impossible.
    How can I convert? any ideas?

    Cheers,
    B

  2. #2
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,676

    Re: Day overran month length 2012-10-36

    You can convert in another column, e.g. if dates start at A2 use this formula in B2 and fill down

    =IF(ISNUMBER(A2+0),A2+0,DATE(LEFT(A2,4),MID(A2,6,2),RIGHT(A2,2)))

    format dates as required
    Last edited by daddylonglegs; 10-15-2013 at 08:23 AM.
    Audere est facere

  3. #3
    Registered User
    Join Date
    11-25-2010
    Location
    London, england
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Day overran month length 2012-10-36

    THanks.... sorry forgot to add the full cell format 2012-10-59 23:52:59 full time stamp.
    Works great, how can I keep time stamp - not essential but nice to have :-)

  4. #4
    Registered User
    Join Date
    11-25-2010
    Location
    London, england
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Day overran month length 2012-10-36

    It works perfectly. sorry my mistake. Even with time.
    Great, Thanks!!!

  5. #5
    Registered User
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,164

    Re: Day overran month length 2012-10-36

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  6. #6
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,676

    Re: Day overran month length 2012-10-36

    If you use the formula I suggested and you also have the time in there then you'll get an incorrect date in most instances. This version should convert correctly and retain the time

    =IF(ISNUMBER(A2+0),A2+0,DATE(LEFT(A2,4),MID(A2,6,2),MID(A2,9,2))+RIGHT(A2,8))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Automatically changing date format of 09/08/2012 to 2012.09.08
    By tokster in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-15-2013, 01:10 AM
  2. Replies: 3
    Last Post: 01-16-2013, 06:55 PM
  3. [SOLVED] Search date range 7/1/2012 - 7/31/2012 and return the results in a new workbook/sheet
    By MelHerndon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-20-2012, 01:13 PM
  4. [SOLVED] Auto fill Quarter (Q1-2012, Q2-2012...) by recognize the date
    By otterandrews in forum Excel General
    Replies: 6
    Last Post: 05-17-2012, 02:30 AM

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