473,804 Members | 3,330 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 1329
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
4256
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 considering converting my calculations over to business days and am wondering if there is anything built-in. I've tried searching but so far haven't seen such a thing built in. I'm thinking I'm just going to have to bite the bullet and create my own...
6
14303
by: vertigo | last post by:
Hello How can i count how many there were days since 1 Jan 1970 ? Thanx Michal
5
14900
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 geographical region. I have written a query which prompts the user for the start and end dates. It also filters for entries which pertain to the particular geographical region. I'm not sure where to go from here.
6
27998
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 to the right of these 2 fields to show the
5
3256
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 that seems barbaric... Anything neater? Cheers Simon Ps, Im also just trying to work out how to calculate the number of mondays and tuesdays etc between two dates... Just thought I'd run this
1
3349
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 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
4
4025
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 with the cost. The program should also give the costs for all 12 days ($72,608.00). If bad data is supplied the program should display a message box to the user and NOT perform any calculations. If the data is good the calculations should be performed...
48
5643
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 database on a server at work that records employee sick leave, by hour, by date. I need to know the number of occurences when employees were gone on sick leave for 10 or more consecutive work days, during a calendar year that starts on Jan 1 and ends...
11
5581
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 much stuck for some days figuring out what to do. Sorry I can't think of a better title. I have a tblMainProfile table, which stores everything about employee's particulars. ID, name, NIRC, etc etc. Next, I have tblLeaveEntitlement table, which...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10571
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9143
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6851
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2990
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.