Jump to content

How to order by time in a day using DATETIME


t_machine

Recommended Posts

Hi, I have a table that stores each record with in a DATETIME column. I was wondering how accurate is it to order by the date column

 

Example

$sql = "SELECT * FROM table_name WHERE {get todays result} ORDER BY date_column DESC";

 

Would an order like that display the results for the day correctly, and would it list the last result for the day first?

 

Thanks for any help :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.