Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 max date
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

4 Posts

Posted - 05/16/2013 :  08:59:08  Show Profile  Reply with Quote
I have two dates for a record 9/30/2012 and 8/31/2014 and max(datevalue) returns 9/30/2012 --- why

Yak Posting Veteran

95 Posts

Posted - 05/16/2013 :  09:11:19  Show Profile  Reply with Quote
Please check the data type of that column may be it is in VARCHAR()


Go to Top of Page

Starting Member

4 Posts

Posted - 05/16/2013 :  09:18:33  Show Profile  Reply with Quote
That did it thanks.
Go to Top of Page

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 05/17/2013 :  00:08:47  Show Profile  Reply with Quote
ALways try to use proper datatype for fields. Otherwise you will have difficulty in doing manipulations like these and would require unnecessary convert operations

SQL Server MVP
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000