+ Reply to Thread
Results 1 to 3 of 3

[SOLVED] Converting Wrong Time Value to Correct One

  1. #1
    David Lanrizen
    Guest

    [SOLVED] Converting Wrong Time Value to Correct One


    In running off a report to a .csv file, for some reason my database
    rendered some of the times wrong. Most of them show up correctly, such
    as 23:55 for 11:55 pm. For reasons unknown though, some showed up as
    2355, and are being interpreted by Excel as a date entry. for example,
    June 12, 1906!

    How can I convert these malformed cells into the correct 'time'
    numbers? Without having to re-type them all manually, that is.

    DL


  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    You could use another column to convert....

    If your "times" are in column A then in B1

    =IF(A1<1,A1,TEXT(A1,"00\:00")+0)

    format as hh:mm

    copy down column

    note: this should return the time if A1 contains just a time or convert otherwise

  3. #3
    David Lanrizen
    Guest

    Re: Converting Wrong Time Value to Correct One

    Bingo - that worked, thanks!

    DL


    daddylonglegs
    <[email protected]> wrote:

    >
    >You could use another column to convert....
    >
    >If your "times" are in column A then in B1
    >
    >=IF(A1<1,A1,TEXT(A1,"00\:00")+0)
    >
    >format as hh:mm
    >
    >copy down column
    >
    >note: this should return the time if A1 contains just a time or convert
    >otherwise



+ 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