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
 SQL Server Development (2000)
 functions please help me

Author  Topic 

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2007-05-02 : 03:37:52
Dear Experts,
I need function to say wether next month 15th is a working day or not?

one more function converts Rupees to Words.........
ex: 4562.22...............the output should be like this
four thousend five hundred and sixty two rupees and twenty two paisa


please guide me in this regard

thank you very much

Vinod

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-05-02 : 03:40:26
This will give you 15th of next month's weekday's name. (Mon, Tue etc).
select datename(weekday, dateadd(month, datediff(month, 0, getdate()) + 1, 14))


"converts Rupees to Words"
If not mistaken there is one in the Script Library. Search for it there.


KH

Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-05-02 : 03:46:19
For determining whether next month's 15th is working day or not, you will need a table that lists holiday dates for the year in addition to KH's code.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2007-05-02 : 04:24:31
if the day is saturday or sunday, then that should be a holiday ro else working day.....
I'm trying with case

Vinod
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-05-02 : 06:01:51
quote:
Originally posted by sunsanvin

if the day is saturday or sunday, then that should be a holiday ro else working day.....
I'm trying with case

Vinod



And what about public holidays?

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -