#1
  1. No Profile Picture
    jfleoni
    Guest
    Devshed Newbie (0 - 499 posts)
    hi, i have to add days to a date coming from a mysql database (format date, not datime)

    how can i do that ?

    tx
  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,648
    Rep Power
    4493
    SELECT date_column + INTERVAL 1 DAY FROM your_table;

    SELECT date_column + INTERVAL 4 MONTH FROM your_table;

    SELECT NOW() + INTERVAL 234 DAY FROM your_table.

    Check the manual for more uses. Chapter 7.4.11 Date and Time functions I believe.

    ---John Holmes...

    ------------------
    *************************************************************
    * The manual can probably answer 90% of your questions...
    *
    * PHP Manual. www.php.net/manual
    * MySQL Manual: www.mysql.com/documentation/mysql/bychapter
    *************************************************************

IMN logo majestic logo threadwatch logo seochat tools logo