1mher3 Posted May 6, 2007 Report Share Posted May 6, 2007 aizkeeros ar teoreetiski elementaaru (itkaa taa vajadzeetu buut) lietu. Nu nevaru izfunktiereet. lieta taada - datu baaze glabaajas datums formaataa Y-m-d H:i:s ... piem. $olddate = "2007-07-09 08:08:12"; tam datumam jaapieskaita dienas. $days = 56; kaa to izdariit? $newdate = ??? paldies jau ieprieksh. Link to comment Share on other sites More sharing options...
Roze Posted May 6, 2007 Report Share Posted May 6, 2007 Ar MySQL: SELECT DATE_ADD(datuma_lauks, INTERVAL 56 DAY) .. ( http://dev.mysql.com/doc/refman/5.0/en/dat...nction_date-add ) vai ar PHP: $newdate = date("Y-m-d H:i:s",(strtotime($olddate)+($days*24*60*60))); ( http://lv.php.net/date http://lv.php.net/strtotime ) Link to comment Share on other sites More sharing options...
1mher3 Posted May 6, 2007 Author Report Share Posted May 6, 2007 paldies Link to comment Share on other sites More sharing options...
Recommended Posts