Hi,
I've the following table "eventos" ( i'm using postgres ):
Table "eventos"
Attribute | Type | Modifier
------------+-----------+---------------------
disciplina | text | not null
var | text | not null default ''
tipo | text | not null
turno | integer | not null default 1
parte | text | not null default ''
indice | integer | not null default 0
inicio | timestamp | not null
duracao | interval | not null
A query to the fields "inicio" and "duracao":
inicio | duracao
---------------------------+----------
2000-10-03 17:30:60.00+01 | 00:59:60
2000-10-04 15:00:60.00+01 | 02:59:60
The time in the field "inicio" represents the beginning of a lesson, the field "duracao" represents the duration of the lesson.
Is there any function in php that let me add the value in the field "duracao" with the time in the field "inicio" so i can get the time at wih lesson ends ?
Example: 17:30:60 + 00:59:60 = 18:30:00
In the field "inicio" i know how to get the value hours, minutes and seconds to variables, than i put all togheter
into a variable.
In the field duracao i can retrive the hours , minutes but then i would have to make some fuction
to know that 59 mins represents an hour etc ...
I've searched the functions date/time in php but 'm a little lost. Is there a fuction that let me do
arithemetic operations with "times".
Anyone can help me here ?
Thanks
ps:sorry my English.