Get the date for the latest record ?

S

SpookiePower

I have a Table called TReport which have a field called
daReportDate, that holds the date where the record was created.
I also have a field, id, that is a autonumber field.

I now want to get the date for the latest post. I have done
it this way -

SELECT DateValue(daReportDate)
FROM TReport
WHERE id = (select Max(id) from TReport)

- it seems to work, but is it the right way to do it ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top