0
在MySQL db中,我以「01:45:00 pm」格式存儲時間值。現在我必須檢查當前時間是否比數據庫存儲時間大。 我曾嘗試:php代碼來檢查greator比兩個給定的時間(例如,下午01:45:00和上午11:12:18)
<?php
$count = 0;
if('01:45:00 pm' >= '11:12:18 am')
{
$count++; //count is variable
}
echo $count;
?>
它給結果爲0;所以請幫助我。
如果(的strtotime('01:45:00')> =的strtotime('11 :12:18 am')) – splash58
非常感謝。它適用於我... –
好的。樂意效勞。 – splash58