473,513 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Leave days calculations

1 New Member
Hie

I am learning VB and I have a table with the following fields:

- EmployeeNo
- Date of Engagement
- From Date
- End Date
- Days Acrued
- Days taken
- Balance

What I want is to calculate DAYS ACRUED by finding the difference between DATE OF ENGAGEMENT and DATE NOW

Secondly DAYS TAKEN = END DATE minus FROM DATE

then BALANCE = DAYS ACRUED - DAYS TAKEN

Please held me how to write the code
Feb 6 '07 #1
1 1318
willakawill
1,646 Top Contributor
Hi. Perhaps you would like to check out the DateDiff() function
Feb 7 '07 #2

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

Similar topics

1
4243
by: David Stockwell | last post by:
I''m wondering if the Calendar object has an option to only do calculations based on business days (ie M-F). Additionally does it have a way to get holidays into itself? Currently I'm...
6
14260
by: vertigo | last post by:
Hello How can i count how many there were days since 1 Jan 1970 ? Thanx Michal
5
14871
by: BlackFireNova | last post by:
I need to write a report in which one part shows a count of how many total records fall within the working days (Monday - Friday) inside of a (prompted) given date range, in a particular...
6
27935
by: carl.barrett | last post by:
Hi, I have a continuous form based on a query ( I will also be creating a report based on the same query). There are 2 fields: Date Obtained and Date Of Expiry I want a further 3 columns...
5
3240
by: Simon Dean | last post by:
Probably being a little thick here, but when you subtract one date away from another, how do you convert the resultant value into a number of days... I guess I could easily / 60 / 60 / 24... but...
1
3329
by: ndindi22 | last post by:
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...
4
4009
by: mexicandayworker | last post by:
I have this problem I have to program with vb2005. Write a program to calculate the 12 days of christmas. The program requests an integer from 1 to 12 and then lists the gifts for that day along...
48
5581
by: Erik Lupien | last post by:
Could someone, anyone, help me and compose a VBA script for me to use with MS Access? I know nothing about MS Access of VBA scripting for it but really need some help. I have an MS Access...
11
5553
by: jjkeeper | last post by:
Hi, I need to create an annual leave Database for the company. I admit I was a complete novice at this. But I got thrown the job and I have to do it. So here's what I get so far, but I got pretty...
0
7161
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7384
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7539
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7101
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7525
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.