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 |
|
crugerenator
Posting Yak Master
126 Posts |
Posted - 2007-11-06 : 13:41:59
|
| will this work to create a whole date if YEAR_OPENED is a solid year. Like 1957 for example?org_date_founded = YEAR_OPENED+'01-01' |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-11-06 : 13:48:52
|
| org_date_founded = Convert(Datetime,Convert(varchar,YEAR_OPENED) +'-01-01')Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
 |
|
|
crugerenator
Posting Yak Master
126 Posts |
Posted - 2007-11-06 : 13:52:13
|
| Nice, thanks. I thought it would be a little more complicated than that. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-11-06 : 13:53:06
|
| [code]DECLARE @YEAR_OPENED intSET @YEAR_OPENED = 1957SELECT DATEADD(Year, @YEAR_OPENED-1900, 0)[/code]Kristen |
 |
|
|
|
|
|