I am wanting to display in the footer when the most recent message was posted.
eg: last post Saturday, 23 July 2011 03:02 p.m.
I am using ASP.Net 4.0, Visual Studio and MSSQL Server Management Studio.
Sql Tables
postID | postCreated
19 | Saturday, 23 July 2011 01:02 p.m.
20 | Saturday, 23 July 2011 02:02 p.m.
21 | Saturday, 23 July 2011 03:02 p.m.
postID is Int and is set as the primary key, and auto increments.
postCreated is Varchar.
What I have tried so far
SELECT max(postID) from “Table”
this shows me the most Recent postID, but I want to extend this to grab the most recent postCreated associated to that ID
Any help would be greatly appreciated.
Cheers
Try this sql query: