9
I have a table with the following field: dh_send (TIMESTAMP) and I want to mount a query to get all records of this table in which the dh_send is equal to the current date (TODAY).
I thought as follows:
WHERE dh.envio BEETWEEN '2014-02-17 00:00:00' AND '2014-02-17 23:59:59'
Is there any way to improve? like using some Mysql constant? Because that way I need to get the date programmatically.
Go you get a date 23:59:59 and 50 hundredths. Ideally compare >= 00:00 and < 00:00 the next day. It’s also good to check how the bank handles the time zone issue.
– epx