I have a question about accuracy.
I wrote the following script for another employee.
I was wondering if there is a better way to tell how many weekends are in this time period, as you can see I took the total number of days and divided by seven and then multiplied by two. The 36 is the number of personal and vacation days per year.
Is there like a workweek function?
Thanks for your help
RITec
I wrote the following script for another employee.
I was wondering if there is a better way to tell how many weekends are in this time period, as you can see I took the total number of days and divided by seven and then multiplied by two. The 36 is the number of personal and vacation days per year.
Is there like a workweek function?
Code:
dim CurDate 'Today's date
dim Tday 'Long date
dim Tdate 'Difference between today and end date
dim hday 'Holiday's and weekends
dim wday 'Workdays left
CurDate = now
Tday = formatDateTime(curdate, vblongdate)
tdate = datediff("d",curdate,#3/7/2010#)
hday = ((tdate/365)*36+(tdate/7*2))
wday = formatNumber((tdate - hday),decimals)
wscript.echo "Hello Employee " & vbcr & _
"Today is " & tday & vbcr & _
"You have " & tdate & " days until retirement" & vbcr & _
"But only " & wday & " are Working days"
Thanks for your help
RITec