Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel compare date timestamp

$now = Carbon::createFromFormat('m/d/Y H:i:s', Carbon::now());
$scheduledAt = Carbon::createFromFormat('m/d/Y H:i:s', $this->smsMessageRequest->scheduled_at);
return $now->gte($scheduledAt->addHours(2));
 
PREVIOUS NEXT
Tagged: #laravel #compare #date #timestamp
ADD COMMENT
Topic
Name
9+3 =