skip to Main Content

Laravel date->format is not working at whereDate()

$period = new DatePeriod( new DateTime( '2024-03-20 00:00:00' ), new DateInterval('P1D'), new DateTime( '2024-03-28 23:59:59' ) ); $orders = OrderProduct::where ('brand','<>','NULL'); foreach ($period as $date){ $labels[] = $date->format('d-m-Y'); $searchDate = $date->format('Y-m-d'); **//This doesn't work** //$searchDate = '2024-03-26'; **//This works** $order…

VIEW QUESTION

Javascript – How to subtract two dates and time in Node.js?

I want to achieve the following when I cancel my subscription: nextBillingTime: 2024-05-10T14:59:58.582+00:00 paypalSubscriptionCancelledAt: 2024-05-07T11:59:18.000+00:00 subscriptionPeriodDuration: 3 days, 3 hours, 0 minutes, 40 seconds I have the following code: paypalRouter.post("/cancel-subscription/webhook", async (req, res) => { try { const webhookEvent =…

VIEW QUESTION
Back To Top
Search