+ Reply to Thread
Results 1 to 7 of 7

Change Excel system date and local system date.

  1. #1
    Registered User
    Join Date
    10-14-2018
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Microsoft Office 2016
    Posts
    37

    Change Excel system date and local system date.

    Hi all,

    This thread is extended from a thread that I had posted previously.
    https://www.excelforum.com/excel-new...-for-date.html

    On that post, Roel did talked about the difference between local system date and Excel system date format.
    The difference is that in Excel, the date format is day-month-year, whereby my local system is month-day-year.

    Anyone knows how to fix this?

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Change Excel system date and local system date.

    Quote Originally Posted by Kanzen View Post
    ...
    The difference is that in Excel, the date format is day-month-year, whereby my local system is month-day-year....
    Not so, and you probably misunderstood Roel.

    What you need to understand about dates and times in excel is…

    a date is just a number representing the number of days passed since 1/1/900...and then formatted in a way that we recognize as a date. So, for instance, today (Sun 31 Mar 2019) is actually 43555

    Time is actually a decimal part of 1 (day), so 06:00 AM is 0.25, 12 noon is 0.5 and 18:00 (or 6 PM) is 0.75

    So to answer your question, all you need to do is adjust the cell formatting under Home/Number/Date
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    10-14-2018
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Microsoft Office 2016
    Posts
    37

    Re: Change Excel system date and local system date.

    Hi FDibbins,

    Thank you for the explanation.

    So let say I copied a date from another system and it shows 12/2/2019, which logically it means 12 February 2019, but Excel formatted it as 2 December 2019, and with the date value of 45801.
    The problem is that I want Excel to show that as 12 February, which is 43508.
    So it means I have to convert 45801 to 43508.
    Anyway I can do so?
    Attached Files Attached Files

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Change Excel system date and local system date.

    Which system are you copying from?
    If you bring the data across in TEXT format, you can use Text2Columns to do the conversion for you.

  5. #5
    Registered User
    Join Date
    10-14-2018
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Microsoft Office 2016
    Posts
    37

    Re: Change Excel system date and local system date.

    I downloaded the data from a bookkeeping system.
    Then, I copy them into an existing database.
    After copying them into existing database, I want to separate the date into two columns, "Year" and "Month".
    123.PNG
    The problem arisen because there are 3 types of date here.
    For example:
    1. 31/12/2018 - cell format is 'date' (which this means 31 December 2018)
    2. 02/12/2018 - cell format is 'date' and date value is 43508 (the problem here is it should be 2 Dec 2018, but shown as 12 Feb 2018)
    3. 16/11/2018 - cell format is 'general' (the problem here is it should be a date value (eg. 43508) when the cell format is 'general)

    These three different format of text messed me up when I was trying to use formula to extract them into another column.

    Btw, I do not understand what is Text2Columns, do you have a link that I can learn from?

  6. #6
    Registered User
    Join Date
    10-14-2018
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Microsoft Office 2016
    Posts
    37

    Re: Change Excel system date and local system date.

    Thank you FDibbins.

    After hours of checking through the function text-to-column, I finally get my problem solved.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Change Excel system date and local system date.

    Apologies, it was getting late here, but Im happy you got what you wanted, 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)

Similar Threads

  1. Change Date Auto In Excel based on system Date
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-20-2017, 06:17 AM
  2. [SOLVED] Date conversion - Excel presents system report date incorrectly
    By Fred Johs in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-02-2017, 10:26 AM
  3. I want to change my system's date as i have in cell A1
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-27-2016, 01:36 PM
  4. Macro to Change System Date format?
    By groundin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-21-2016, 04:42 AM
  5. Change system date with VBA
    By RedWing in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-31-2011, 11:38 AM
  6. Change system date and time format
    By elcaris in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2008, 03:34 PM
  7. [SOLVED] How can I change Excel to use the British date system?
    By EddieA in forum Excel General
    Replies: 3
    Last Post: 07-25-2006, 08:00 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