Red Gate forums :: View topic - FormatDate
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation

SQL Prompt code snippets forum

FormatDate

Search in SQL Prompt code snippets forum
Post new topic   Reply to topic
Jump to:  
Author Message
Bill_Ross



Joined: 22 Mar 2010
Posts: 14

PostPosted: Mon May 24, 2010 3:39 pm    Post subject: FormatDate Reply with quote

Snippet name: fd
Description: Format a date as YYYY-MM-DD
Code:
CONVERT(CHAR(10), <inDate, DateTime, GETDATE()>, 23) AS [Date]

Use Ctrl-Shift-M to populate the parameter.
Defaults to GetDate()
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group