+ Reply to Thread
Results 1 to 2 of 2

Text Timestamp Macro

  1. #1
    Registered User
    Join Date
    06-05-2015
    Location
    Manchester, UK
    MS-Off Ver
    2016
    Posts
    94

    Text Timestamp Macro

    Hi All,

    I have created a subroutine to convert a bunch of text date/timestamps into a correctly formatted excel time. For some reason, it doesn't seem to want to work with certain times, but works fine with others. It seems to be something to do with the length of the whole string, but no amount of tweaking seems to fix it. It seems to be doing most of the function, but not the final 'TimeValue' part.

    The code is:

    Please Login or Register  to view this content.
    9/18/2017 1:00:00 PM returns 1:00:00 PM (as text)
    9/18/2017 10:10:00 AM returns 0.42361 (as I would like it to do)


    Hope someone can help!

    Thanks,
    Mark

    EDIT: Solved it myself - needed to change the cell format from text to general beforehand.
    Last edited by seasider89; 09-15-2017 at 11:43 AM. Reason: Solved

  2. #2
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    853

    Re: Text Timestamp Macro

    What about formatting the cell to your needs? Modify the below to fit your loop

    Please Login or Register  to view this content.

+ 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. Replies: 2
    Last Post: 11-09-2016, 02:23 PM
  2. VBA - Text String Activates Timestamp
    By HDTV in forum Word Programming / VBA / Macros
    Replies: 1
    Last Post: 06-08-2015, 01:02 AM
  3. [SOLVED] Timestamp Macro Error
    By Taiter in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-13-2014, 08:09 AM
  4. text to timestamp conversion
    By nivn in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-29-2013, 09:05 AM
  5. Convert text to hours/timestamp
    By Daniel86 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-12-2012, 06:06 PM
  6. When a timestamp doesn't behave as a timestamp
    By mredekopp in forum Excel General
    Replies: 3
    Last Post: 03-07-2011, 03:39 PM
  7. [SOLVED] Timestamp Macro
    By alexfthe in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-12-2006, 07:45 PM

Tags for this Thread

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