skip to Main Content

Getting error for filtering current_date in Postgresql

I have 2 queries in Postgresql. Both Queries are used to extract same information. 1st Query---- SELECT "pld.PlanDate" FROM salesdespatch.sld_cube_salesdespatchdetailshop WHERE "pld.PlanDate" Between '2023-04-01' AND current_date; 2nd Query---- SELECT "pld.PlanDate" FROM salesdespatch.sld_cube_salesdespatchdetailshop WHERE "pld.PlanDate" Between '2023-04-01' AND '2023-04-11'; When I…

VIEW QUESTION

PHP, how to format DateTimeInterface for mysql?

When I write a php DateTimeInterface to mysql timestamp field, I always do: $datetime = (new DateTime())->format('Y-m-d H:i:s'); $sql = "... when_inserted = '$datetime'"; I know that DateTimeInterface::format supports Full Date/Time formatting (c, r), but both of them produce a…

VIEW QUESTION
Back To Top
Search