kindly let me know the coding for difference between two dates in the format years, months and days for calculation of qualifying service.
let date of joiningas 19-101983
date of retirement is 30-09-2008
then total qualifying service ? how it will be caculated through coding in visual basic

Hi,

Use DateDiff function:

dim t as integer
t = DateDiff("d",cdate("19-10-1983"),cdate("30-09-2008"))

You will get difference in Days,
Replace d with yyyy for years
m for month..

OR divide t by 12 to get years..

Regards
Veena

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.