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 |
|
obewankanoochie
Starting Member
24 Posts |
Posted - 2008-10-06 : 18:34:32
|
| I'm trying to create a date using the following SQL:CAST(year(dateAdd("year",1,getdate())) + '/' & month(getdate()) + '/' + day(getdate()) AS smalldatetime) AS moderndateCan someone tell me what I'm doing wrong?Thanks. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
obewankanoochie
Starting Member
24 Posts |
Posted - 2008-10-06 : 18:44:55
|
| sorry. I'm trying to create a smalldatetime variable that looks like '2009-10-06'. I might be passing in other values for month and date though, so I was trying to put three variable together (year/month/day). thanks. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|