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 |
|
ALBean
Starting Member
12 Posts |
Posted - 2004-06-02 : 16:11:05
|
| select convert(char(2), datepart(month,getdate()))The above code will convert to a 6 with a space after it. Is there a clever way to get it convert to "06" instead? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-06-02 : 16:14:09
|
| SELECT RIGHT('0' + CONVERT(VARCHAR(2), MONTH(GETDATE())), 2)Tara |
 |
|
|
ALBean
Starting Member
12 Posts |
Posted - 2004-06-02 : 16:20:22
|
| Tara, thanks for slaying that dragon for me! |
 |
|
|
|
|
|