Results 1 to 3 of 3

Thread: [RESOLVED] Difference in Hours

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2011
    Posts
    675

    Resolved [RESOLVED] Difference in Hours

    Hi


    MsgBox DateDiff("h", rs0.Fields("gtime"), ServerTime)

    GTime is a database field . Value Gtime is showing 1900-01-01 14:37:11
    Servertime showing value 14:43:33

    Result is showing -48 . Why is it so

    Thanks

  2. #2
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    2,233

    Re: Difference in Hours

    MsgBox DateDiff("h", format(rs0.Fields("gtime"), "hh:mm:ss"), ServerTime)
    One System to rule them all, One IDE to find them,
    One Code to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    For health reasons i try to avoid reading unformatted Code

  3. #3
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    3,890

    Re: Difference in Hours

    I would first check the actual returned values:
    Code:
    Debug.Print CDbl(rs0.Fields("gtime")), CDbl(ServerTime)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width