Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
yosiasz
Master Smack Fu Yak Hacker
1635 Posts |
Posted - 2010-01-28 : 19:28:38
|
| Hi there I wanted to get mm/dd/yy using CONVERT but did not get very far. BUt by chance when using CONERT(varchar(8), s.StartDate, 1) I got just what I needed but this style of 1 is not documented anywhere. Am I missing something here or is it documented somewhere? Or is this an Easter egg?<><><><><><><><><><><><><><><><><><><><><><><><><>If you don't have the passion to help people, you have no passion |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2010-01-28 : 19:58:10
|
| It is documented in my copy of Books Online. It's the US standard of mm/dd/yyyy.=======================================Few things are harder to put up with than the annoyance of a good example. (Mark Twain) |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2010-01-29 : 03:53:33
|
"but this style of 1 is not documented anywhere"As Bustaz Kool says its in the SQL DOCs "Books Online", specifically on the page about the CONVERT() function http://msdn.microsoft.com/en-us/library/ms187928.aspx |
 |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-01-29 : 04:47:30
|
| select CONVERT(varchar(10),getdate(), 1) returns 01/29/10select CONVERT(varchar(10),getdate(), 101) returns 01/29/2010PBUH |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-01-29 : 07:49:34
|
| In BOL, refer this ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/a87d0850-c670-4720-9ad5-6f5a22343ea8.htmMadhivananFailing to plan is Planning to fail |
 |
|
|
yosiasz
Master Smack Fu Yak Hacker
1635 Posts |
Posted - 2010-01-29 : 11:41:28
|
| Thanks folks must be going blind :(<><><><><><><><><><><><><><><><><><><><><><><><><>If you don't have the passion to help people, you have no passion |
 |
|
|
|
|
|