Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question diff between UTC time and stored timestamp

    Hi there,

    I have searched around and have absolutly no clue on how to use the DateDiff function in this situation. I have a query which returns four fields,


    SELECT matches.matchid,
    clan.cname,
    gametype.gtname,
    matches.starttime
    FROM matches,
    clan,
    gametype
    WHERE matches.t2id = #session.clan_id#
    AND matches.t1id = clan.cid
    AND matches.mgametype = gametype.gtid

    I would like a fifth column which returns the difference between the matches.startime value and the current UTC timestamp, (select utc_timestamp), I have tried using the DateDiff function but have really no clue how to do this.

    All help is appreciated.

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Try timediff() instead.


  •  

    Posting Permissions

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