Click here to Skip to main content
15,884,012 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to find latest date from the database. there is 20 dates in my date column. but i want to find date which is latest(newer) from all other dates in database. so how can i do ?

please help...

Thankss...
Mitesh
Posted

You can use the T-SQL function MAX[^]

SQL
SELECT MAX(mdate) FROM mtbl
 
Share this answer
 
Comments
[no name] 7-May-12 2:36am    
thanks....
You can use max() http://sqlforeverydb.blogspot.in/2012/04/sql-max-function-mysql.html[^]

eg: SELECT MAX(your date column) FROM yourTableName;
 
Share this answer
 
Comments
[no name] 7-May-12 2:36am    
thankss...
You can execute the following SQL Command:

SELECT MAX(NameOfTheDateFieldColumn) FROM NameOfTheDatabaseColumn;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900