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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Date function

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-01-12 : 08:44:10
william writes "Return a date (This is a calculated date based on the input arguments) It need to Take 3 arguments
Starting Date (Date) (Example 10/10/2005)
Increment (integer) (Example è +4 or -3)
Day of the Week (Varchar)
(Example Monday or Thursday)


Example: If I need to calculate the 5th Monday after 10/10/2005 I will call the function like this è

Exec fnCalculateNewDate @startDate= ‘10/10/2005’, @Increment=+5, @DayOfTheWeek=’Monday’

If I need to calculate 4th Sunday before ‘10/10/2005, I will call the function line this

Exec fnCalculateNewDate @startDate= ‘10/10/2005’, @Increment=-4, @DayOfTheWeek=’Sunday’"

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2006-01-12 : 09:08:27
Are you giving us an assignment, or do you have a question? What have you tried?
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-01-12 : 11:03:44
Didn't you post this before?

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=59924


CODO ERGO SUM
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-01-12 : 19:37:34
I guess the deadline for the homework / assignment is very very near

-----------------
'KH'

Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.
Go to Top of Page
   

- Advertisement -