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 |
|
jrockfl
Posting Yak Master
223 Posts |
Posted - 2006-06-22 : 15:49:20
|
| I'm working on a UDF that returns a data, but is broken up....Returns DateSET @RefDay = 1SET @RefMonth = 12SET @RefYear = 2003Not sure, how to do it...RETURN @RefMonth/@RefDay/@RefYearHow can I return 12/1/2003? |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2006-06-22 : 18:25:14
|
Is that T-SQL Brett ???...RETURN(SELECT DATEADD(YEAR,@RefYear,DATEADD(MONTH,@RefMonth,DATEADD(DAY,@RefDay,0)))Edit. Sorry I must have been drunk or something...Edit2.Thread 22339 !?!? Khtan?, how?!rockmoose |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2006-06-22 : 20:14:11
|
quote: Originally posted by rockmoose...Edit2.Thread 22339 !?!? Khtan?, how?!rockmoose
I have a link to 22339 in the "Converting Year, Month, and Day to DateTime" section in the link below, plus I recently posted on that thread. I have been trying to assemble the answers to many of the typical date/time questions on that link as a "help yourself" resource. I went through the whole Script Library looking for posts about date/time and linked to that post and many others.Date/Time Info and Script Linkshttp://www.sqlteam.com/forums/topic.asp?TOPIC_ID=64762CODO ERGO SUM |
 |
|
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2006-06-22 : 20:29:16
|
"I went through the whole Script Library" Did you see the post about dates and excel on joel?I enjoyed it. "My First BillG Review"rockmoose |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2006-06-23 : 16:13:35
|
Don't flirt with the dark side.Only meet on neutral csv ground. rockmoose |
 |
|
|
|
|
|
|
|