C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » SQL »

Date Format in SQL SERVER 2005


Posted Date: 12 Oct 2009    Resource Type: Code Snippets    Category: SQL
Author: santoshMember Level: Silver    
Rating: 1 out of 5Points: 5



Below Code will help you to find uut the different types of date format in Sql server 2005

SELECT CONVERT(VARCHAR,GETDATE(),100) AS TODAY

try with Below ID Just Changing the ID.
ID Return Date Format
0 OR 100 mon dd yyyy hh:miAM (or PM)
101 mm/dd/yy
102 yyyy.mm.dd
103 dd/mm/yyyy
104 dd.mm.yyyy
105 dd-mm-yyyy
106 dd mon yyyy
107 Mon dd, yy
108 hh:mm:ss
9 OR 109 mon dd yyyy hh:mi:ss:mmmAM (or PM)
110 mm-dd-yy
111 yyyy/mm/dd
112 yyyymmdd
13 OR 113 dd mon yyyy hh:mm:ss:mmm(24h)
114 hh:mi:ss:mmm(24h)
20 or 120 yyyy-mm-dd hh:mi:ss(24h)
21 or 121 yyyy-mm-dd hh:mi:ss.mmm(24h)
126 yyyy-mm-dd Thh:mm:ss.mmm(no spaces)
127 yyyy-mm-dd Thh:mm:ss.mmm(no spaces)
130 dd mon yyyy hh:mi:ss:mmmAM


For more details, visit http://santoshdotnetarena.blogspot.com/2009/10/date-format-in-sql-server-2005.html



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Return Date Format in SQL SERVER 2005  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Go Back to the Parent Report in SSRS
Previous Resource: How to get the nth highest value from the database table using SQL
Return to Discussion Resource Index
Post New Resource
Category: SQL


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use