Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
to_char(DATE_TILL,'dd-MON-rrrr') this is Oracle syntax to get only date from table.
What is alternate in SQL Server?
Please reply soon
Posted
Updated 8-Mar-13 23:06pm
v2

1 solution

The built-in convert function supports only limited number of formatting, but you can write your own function to extend it.
http://www.sql-server-helper.com/tips/date-formats.aspx[^]
http://anubhavg.wordpress.com/2009/06/11/how-to-format-datetime-date-in-sql-server-2005/[^]
http://dataeducation.com/blog/output-date-formatting[^]

In SQL 2012 you have a FORMAT[^] function out of the box capable of doing much more.
 
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