+ Start a Discussion
Pavushetti Abhilash 3Pavushetti Abhilash 3 

SOQL QUERY TO FETCH LATEST RECORD AS PER TIME

Please write a soql query to get latest record as per latest date and time.
Eg: select id, name from case  ORDER BY createdDate
I need to display record in table as per latest record created by time default.
CharuDuttCharuDutt
Hii Pavushetti
Try Below Query
select id, name from case  where  createdDate = Today
OR
select id, name from case order by createddate DESC
Please Mark It As Best Answer If It Helps
Thank You!
Suraj Tripathi 47Suraj Tripathi 47
Hii Pavushetti,
Here is the solution:
Please try this:
select id, name from case order by createdDate DESC

Thanks