Mysql DATE_ADD

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob Bedford

    Mysql DATE_ADD

    Hi, I'm trying this query:

    insert into logpay(datetime ,ip,typepay,ida nnounce)
    values(DATE_ADD (NOW(),INTERVAL 14 DAYS),'255.255. 255.255',2,178)
    I want to add 14 days from now in datetime field.

    If I use NOW() it works, but using DATE_ADD it doesn't work anymore.

    I want the datetime of the mysql server, not the apache server.

    It is possible ?

    bob


  • Bob Bedford

    #2
    Re: Mysql DATE_ADD

    Found.[color=blue]
    > insert into logpay(datetime ,ip,typepay,ida nnounce)
    > values(DATE_ADD (NOW(),INTERVAL 14 DAYS),'255.255. 255.255',2,178)
    > I want to add 14 days from now in datetime field.[/color]
    It's 14 DAY not DAYS... (without S).


    Comment

    Working...