+ Reply to Thread
Results 1 to 5 of 5

Working with negative dates and times

  1. #1
    Forum Contributor
    Join Date
    05-22-2012
    Location
    Boise, Idaho
    MS-Off Ver
    Office 365
    Posts
    160

    Working with negative dates and times

    Hello-- I have an export of data which is a list of details on support tickets opened. One column is a list of times in GMT form of HH:MM am/pm. I need to convert these to MST which is 7 hours less. When I do this formula, D2-TIME(7,0,0) it works for all cells except those times that are earlier than 6:59. In those cases it give an error of continual ####### signs. How do I overcome this and have a time of 2:45 am (GMT) change to 7:45 pm (MST).

    here are some examples
    Excel Forum example.xls

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Working with negative dates and times

    mrteater,

    Try adding a 1 to it, which adds a whole day so that it doesn't affect the time of day, and prevents negative times which causes the ###### signs:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Working with negative dates and times

    Hi mrteater

    Try: =MOD(G2-TIME(7,0,0),1)
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  4. #4
    Forum Contributor
    Join Date
    05-22-2012
    Location
    Boise, Idaho
    MS-Off Ver
    Office 365
    Posts
    160

    Re: Working with negative dates and times

    That worked perfectly-- Thank you

  5. #5
    Forum Contributor
    Join Date
    05-22-2012
    Location
    Boise, Idaho
    MS-Off Ver
    Office 365
    Posts
    160

    Re: Working with negative dates and times

    That works too--Thanks

+ 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