+ Reply to Thread
Results 1 to 3 of 3

Fix date and time

  1. #1
    Forum Contributor
    Join Date
    10-11-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    358

    Fix date and time

    I hate dates...

    I've had this problem for ages and have never focused to retain the definitive answer on how to logically and accurately fix this.

    Please find spread-sheet attached. I want to "cure" this spread-sheet so that excel can read the date and time in this format: dd/mm/yyyy hh:mm

    Sometimes I think i have it sorted but I then find out later that it wasn't completely right. Is someone able to demonstrate a way I can definitively check and fix the dates up the way i want?

    Thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Fix date and time

    Hi domgilberto,

    The way data is inputted into the cells is the main point of concern here.

    Go to Control Panel >> Regional and Language Options
    Here see the short date format.
    This is your input format.

    So if your input format is dd-mm-yyyy and you enter a date in excel like 12-31-2015 i.e. in format mm-dd-yyyy excel won't recognize it as date but as text. This is because 12-31-2015 is beyond the limits of dd-mm-yyyy, as there is no month - 31
    If you enter 04-05-2015 excel would recognize it as 4 May 2015 even if you intended to input 5 April 2015.

    So in your spreadsheet you have wrong "INPUT" format. Somewhere you are inputting mm-dd-yyyy and somewhere dd-mm-yyyy.
    So excel is taking mm-dd-yyyy as text not dates.

    The Excel FORMAT CELLS option is for changing the formats of the cell after they have been correctly inputted. So if you have inputted the date as "DATE" now you can change the format in which you want to view the date. But if you have not "INPUTTED" the date in the correct input format, excel takes it as just pure text and is unable to change the format of the cell as you want.

    So basically all depends on the input. Excel would recognize a date as "DATE" only and only if it matches with the format in the "REGIONAL and LANGUAGE options".

    For now I have made all your dates entered as Dates in the cells. Now excel has recognized all of them as dates and you can edit to any format you want to view the date in.
    I did that by going to control panel >> Regional and Language options,
    then changed my input format to mm-dd-yyyy
    Then I went back to excel and all the dates which were in the format mm-dd-yyyy, I selected the cells one by one pressed F2, then pressed ENTER. Now excel recognized it as "DATE". Once all have been correctly inputted, I just selected the whole column A and formatted in DD-MM-YYYY.

    I hope that helps!
    Attached Files Attached Files
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  3. #3
    Forum Contributor
    Join Date
    10-11-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Fix date and time

    fantastic explanation and little hack there!

    REALLY appreciate this - I've been trying ALL sorts to get these dates right! Thank!

+ 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. [SOLVED] Convert Unix Date-time stamp to excel date and/or time columns
    By judikz in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-13-2015, 05:46 PM
  2. Replies: 9
    Last Post: 02-15-2015, 07:32 PM
  3. Replies: 3
    Last Post: 12-19-2013, 06:49 AM
  4. Calculation of time difference between the Start date & time & End Date & time
    By Harry Jones in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-17-2012, 03:54 PM
  5. Replies: 0
    Last Post: 07-17-2012, 10:11 AM
  6. Calculating days & time left from start date/time to end date/time
    By marie in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-07-2005, 10:40 AM
  7. Replies: 0
    Last Post: 08-28-2005, 10:35 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