zintis8789 Posted August 31, 2009 Report Share Posted August 31, 2009 Var kāds pateik skriptu : varetu izskatities tā: $date = 12:00:00; $beigas = $date = 30(dienas pec ta datuma) Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted August 31, 2009 Report Share Posted August 31, 2009 12:00:00 1. gada 1. janvārī? Quote Link to comment Share on other sites More sharing options...
zintis8789 Posted August 31, 2009 Author Report Share Posted August 31, 2009 Nee veinkārsi man vai g skriptu kas saskaita datumus proti 12:00:00|+12:00:00 Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted August 31, 2009 Report Share Posted August 31, 2009 Tev vajag saskaitīt stundas/pulksteņlaiku vai datumus? Ja datumus, tad ir jābūt arī datuma daļai. :) Quote Link to comment Share on other sites More sharing options...
zintis8789 Posted August 31, 2009 Author Report Share Posted August 31, 2009 Man vaig saskaitit: datums:men:gads |+ d:menesis:gads Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted August 31, 2009 Report Share Posted August 31, 2009 Tātad, kad rakstīji 12:00:00 Tu domāji 0. gada 0. mēneša 12 datumu? Savāda datumu skaitīšanas sistēma... Katrā gadījumā iekš PHP apskati: http://lv.php.net/manual/en/datetime.add.php Iekš MySQL apskati: http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_adddate Quote Link to comment Share on other sites More sharing options...
Kaklz Posted August 31, 2009 Report Share Posted August 31, 2009 kā tu iedomājies skaitīt kopā datumus? Piemēram: 2009-01-01 + 2009-02-01 = ? Es vairāk sliecos uz to, ka tu gribi paspēlēties ar strtotime funkciju, piemēram: date('Y-m-d H:i:s', strtotime("+12 hour", strtotime("2009-01-01 14:34:49"))) ==> 2009-01-02 02:34:49 Quote Link to comment Share on other sites More sharing options...
Kavacky Posted August 31, 2009 Report Share Posted August 31, 2009 kā tu iedomājies skaitīt kopā datumus? Piemēram: 2009-01-01 + 2009-02-01 = ? ... = 4018-03-02; ja dienu skaits pārsniedz mēneša dienu skaitu vai mēnešu skaits 12, tad pārnesam pa kreisi un aidā. (: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.