469,277 Members | 2,241 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,277 developers. It's quick & easy.

Calculate leave days from Startdate to enddate of contract

Can someone plz help me.

I'm working on leave application, have to calculate number of leave days available, starting from Startdate to Enddate of a contract. Where an employee get 1 day leave after 17 days from startdate of contract. How do I calculate the leave days, that accrue every after 17 days by 1.

I'm using ASP and SQL Server 2000 (Query Analyzer)

ndindi22
Aug 16 '07 #1
1 3164
ck9663
2,878 Expert 2GB
Can someone plz help me.

I'm working on leave application, have to calculate number of leave days available, starting from Startdate to Enddate of a contract. Where an employee get 1 day leave after 17 days from startdate of contract. How do I calculate the leave days, that accrue every after 17 days by 1.

I'm using ASP and SQL Server 2000 (Query Analyzer)

ndindi22

get the datediff between startdate to getdate() in days...divide by 17...

select @numberofleave = datediff(dd, StartDate, getdate())/17 from yourtable
Aug 16 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

13 posts views Thread by David Gray | last post: by
7 posts views Thread by Sam | last post: by
4 posts views Thread by nologo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.