Announcement

Collapse
No announcement yet.

date

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • date

    I created a date field, in another numeric field I entered as 30, in another field that I can call expiration date is calculated by calculating the right date from the first date field and the other field 30

  • #2
    Use function date_add():
    <?php
    $fecha = date_create('2000-01-01');
    date_add($fecha, date_interval_create_from_date_string('10 days'));
    echo date_format($fecha, 'Y-m-d');
    ?>

    Comment


    • #3
      but i want put the new date in a field? any query ?

      Comment


      • #4
        http://www.w3schools.com/sql/sql_dates.asp

        Dave
        Dave Prue
        Code Whisperer
        Lahar International Corp
        www.lahar.net

        Comment

        Working...
        X