FormatDate

Bill_RossBill_Ross Posts: 20
edited May 24, 2010 10:39AM in SQL Prompt code snippets
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()
Sign In or Register to comment.