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
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 format in 2010
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

40 Posts

Posted - 01/18/2013 :  12:55:20  Show Profile  Reply with Quote

gives me an error saying that FORMAT is not recognized so how do I format a date string into mm/dd/yyyy

Flowing Fount of Yak Knowledge

United Kingdom
2179 Posts

Posted - 01/18/2013 :  13:05:20  Show Profile  Visit jackv's Homepage  Reply with Quote
using the 101 option and CONVERT you can get the format you require. Read more in books online

SELECT CONVERT(nvarchar(10), GETDATE(), 101) AS Convert_to_101 ;

Jack Vamvas
Go to Top of Page

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 01/18/2013 :  13:12:13  Show Profile  Reply with Quote
FORMAT() function is only available from 2012 onwards

Ideally you should be trying to do formatting at front end if possible. Converting dates to varchar just for formatting is an overkill

SQL Server MVP

Go to Top of Page

Starting Member

40 Posts

Posted - 01/18/2013 :  15:54:53  Show Profile  Reply with Quote
Thanks your input created a fix.
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.05 seconds. Powered By: Snitz Forums 2000