+ Reply to Thread
Results 1 to 5 of 5

Macro to calculate Human readable date.

  1. #1
    Registered User
    Join Date
    06-03-2014
    Posts
    3

    Question Macro to calculate Human readable date.

    Can someone help me with a Macro to convert Decimal to Human readable date format please?

    Eg: 1400158027078650000 should be converted to GMT: Thu, 15 May 2014 12:47:07 GMT


    I tried using this cell reference formula but it doesnt seem to work (A1/86400)+25569+(-5/24)

    Any other ideas please?

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Macro to calculate Human readable date.

    Can you explain what that number represents?
    Can you post a few more examples (and their translated results)
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    06-03-2014
    Posts
    3

    Re: Macro to calculate Human readable date.

    Hexadecimal code -> Decimal code -> Date for this from (http://www.epochconverter.com/)
    136E5C4EA96F548C -> 1400158027078650000 -> Thu, 15 May 2014 12:47:07 GMT
    1348ED3364706300 -> 1389621290028000000 -> Mon, 13 Jan 2014 13:54:50 GMT

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Macro to calculate Human readable date.

    Try this:
    With
    A1: a unix time.....1389621290028000000

    This regular formula returns the Date/Time value and works if the reference is numeric OR text
    Please Login or Register  to view this content.
    to use a VBA User Defined Function, put this code in a general module:
    Please Login or Register  to view this content.
    Use the UDF this way in a worksheet:
    Please Login or Register  to view this content.
    Format B1 cell as custom time (m/d/yy h:mm:ss)

    In that example, the formula returns: 41774.5327199074
    which formats to: 5/15/2014 12:47:07

    Is that something you can work with?
    Last edited by Ron Coderre; 06-03-2014 at 01:04 PM.

  5. #5
    Registered User
    Join Date
    06-03-2014
    Posts
    3

    Re: Macro to calculate Human readable date.

    Excellent...that works !!

    Many Thanks for your help.

+ 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. Human Resources Spreadsheet
    By shazeela in forum Excel General
    Replies: 3
    Last Post: 07-12-2012, 05:32 PM
  2. [SOLVED] Convert Unix timestamp to Readable Date/time
    By Emily in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-26-2006, 08:00 PM
  3. [SOLVED] Converting a custom date to readable text
    By Crossed eyes in forum Excel General
    Replies: 2
    Last Post: 12-29-2005, 03:26 PM
  4. [SOLVED] How do I set up an Human resources task planner
    By maureen1 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-15-2005, 11:50 AM
  5. [SOLVED] How can I stop a macro for Human Interaction
    By Henry Stock in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-19-2005, 07:06 PM

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