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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-12-04 : 08:08:49
|
| LINDA writes "I need to have dates appear as yyyymmdd. What do I use to format dates this way (they currently appear as mmddyyyy)." |
|
|
Amethystium
Aged Yak Warrior
701 Posts |
Posted - 2003-12-04 : 08:26:36
|
| DECLARE @myDate DATETIMESET @myDate = '08/23/1978' -- 23rd August 1978SELECT CONVERT(CHAR(10), CONVERT(DATETIME, @myDate), 112) -- YYYYMMDD________________Make love not war! |
 |
|
|
|
|
|