+ Reply to Thread
Results 1 to 3 of 3

Excel VBA: Convert a date string to a HFS + timestamp

  1. #1
    Forum Contributor
    Join Date
    02-25-2013
    Location
    Colorado, US
    MS-Off Ver
    Excel 2016
    Posts
    516

    Excel VBA: Convert a date string to a HFS + timestamp

    Hello. I have a variable row of time stamps. What would be the correct syntax to convert date string "10/1/2016 12:15:00 AM" to HFS + timestamp
    HFS Plus-timestamp being the number of seconds since midnight, January 1, 1904 GMT
    I need to store values in adjacent column as long data type values. This is what I've been able to surmise.
    The current HFS Plus time:
    Please Login or Register  to view this content.
    date2hfs converts a VBScript date to an HFS timestamp:
    Please Login or Register  to view this content.
    I'm at a bit of a loss on what the syntax would be for a sub routine. Would I just call up the function?

  2. #2
    Forum Guru
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,450

    Re: Excel VBA: Convert a date string to a HFS + timestamp

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Contributor
    Join Date
    02-25-2013
    Location
    Colorado, US
    MS-Off Ver
    Excel 2016
    Posts
    516

    Re: Excel VBA: Convert a date string to a HFS + timestamp

    thank you.

+ 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. Convert Timestamp to date.
    By brent_milne in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-09-2015, 01:31 PM
  2. Convert timestamp to date
    By brent_milne in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-29-2015, 10:02 PM
  3. [SOLVED] VBA - Convert Date/Timestamp into American Date and Military Timestamp
    By ryanmorris in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-01-2015, 03:43 PM
  4. [SOLVED] Convert a cell with a timestamp in it to just the date to compare to another date
    By Tanyab in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-17-2013, 05:41 AM
  5. Convert Timestamp vaule to date
    By dpatel in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-23-2010, 06:47 AM
  6. [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
  7. [SOLVED] How can I convert an exported UNIX timestamp in excel?
    By prod sorter in forum Excel General
    Replies: 5
    Last Post: 03-20-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