+ Reply to Thread
Results 1 to 3 of 3

Need UDF to return time format from string input

  1. #1
    Registered User
    Join Date
    11-11-2011
    Location
    Maine, USA
    MS-Off Ver
    Excel 2010, Windows 7 or XP
    Posts
    16

    Need UDF to return time format from string input

    I have a lot of login logout data that that displays time as, for example, "1:37:22PM" as a string. I'm trying to make a UDF that inputs time in that format (I've attached a workbook with a small sample dump of the times) and outputs the correct time format so that I can use comparison operators. Unfortunately, I seem to be incredibly bad at parsing this and keep messing up. Any tips or help would be incredibly appreciated,

    Thanks!

    testbook.xlsx

    Edit: Apparently, I also am bad at attachements.
    Last edited by Andrew_Harris; 10-25-2012 at 10:08 PM.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,588

    Re: Need UDF to return time format from string input

    try this
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-11-2011
    Location
    Maine, USA
    MS-Off Ver
    Excel 2010, Windows 7 or XP
    Posts
    16

    Re: Need UDF to return time format from string input

    Thank you so much! I had no idea the CDate() function existed. Remarkably helpful.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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