I have a table called "fault". In this table I have fields called date_opened and date_closed.
I would like to select all records from "fault" whereby the time period between date_opened and date_closed is over 2 days. This is the pseudo code that I think I sort of need, but I'm not sure the correct way to write it in a php page.
Select * from fault where (date_closed - date_opened) >2;
Can anyone help?
calculating with date fields
1 reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users