want time that is 3 hours later

Posted on 2012-08-29
Last Modified: 2012-08-29
insert into
datetime field

I want the time that is 3 hours later


both '2012-08-29 01:00:43'

'0000-00-00 00:00:00'

how can I get
'2012-08-29 04:00:43'

I am working on godaddy shared server and I can not change mysql time
Question by:rgb192
    LVL 24

    Accepted Solution

    Say hello to the date_add function see

    date_add(now(), interval 3 hour)
    LVL 12

    Assisted Solution

    by:Anuradha Goli
    Change ur code based on this example
    UPDATE events SET date_starts = DATE_ADD(date_starts,INTERVAL 2 HOUR) WHERE event_id = 3;

    Open in new window


    Author Closing Comment

    both add to date


    Featured Post

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    Join & Write a Comment

    Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
    Introduction In this installment of my SQL tidbits, I will be looking at parsing Extensible Markup Language (XML) directly passed as string parameters to MySQL 5.1.5 or higher. These would be instances where LOAD_FILE (…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now