I have a table that stores a day number and a time and I need to be
able to get the next occurance of the w

For example in DB if I have:
4 as dayNo (Thursday) and 08:34 as Time and I want to return
18/Aug/2005 08:34
5 as dayNo (Friday) and 15:00 as Time I want to return 19/Aug/2005
15:00
5 as DayNo (Friday) and 23:45 as Time I want to return 12/Aug/2005
23:45 (as the current time is 19:30)
Can anyone help me with a UDF?
Thankshttp://www.aspfaq.com/show.asp?id=2519
Adam Machanic
SQL Server MVP
http://www.datamanipulation.net
--
"Rippo" <info@.rippo.co.uk> wrote in message
news:1123871644.325175.149000@.z14g2000cwz.googlegroups.com...
> Hi
> I have a table that stores a day number and a time and I need to be
> able to get the next occurance of the w

> For example in DB if I have:
> 4 as dayNo (Thursday) and 08:34 as Time and I want to return
> 18/Aug/2005 08:34
> 5 as dayNo (Friday) and 15:00 as Time I want to return 19/Aug/2005
> 15:00
> 5 as DayNo (Friday) and 23:45 as Time I want to return 12/Aug/2005
> 23:45 (as the current time is 19:30)
> Can anyone help me with a UDF?
> Thanks
>|||Perfect!
Thanks, Rippo