php code calculate 30 minutes from created datetime field in table -


in table there created datetime field in data inserting 2016-05-25 11:50:35.

suppose insertion time 11:50 , current time 12:10,so differnce 20 mins. need check difference in 1 variable , check if differnce > 30 edit link invisible else visible.

below code..

i extracted mins created datetime field database.

$var1 = $post['shipperrating']['created']; $time1 = date('i', strtotime($var1));  $finaltime = $time1; echo $finaltime; 

$createddatetime = new datetime($post['shipperrating']['created']); $createddatetime->modify('+30 minutes');  if ($createddatetime >= new datetime()) {     echo '<a href="/url">edit</a>'; } 

Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -