473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problems using Dtpicker in VB6

q.1How to use DTpicker in vb6 add , difference, between two date e.g
one employee date of birth is 15/1/1987. and how we will use dtpicker to calculate its retirement date after completion a service of 57 years.

q.2 How can i calculate the current date in today i.e. 20/02/2008 from his date of birth i.e, 15/01/1987. How many year he complete i.e, age as on 20/02/2008.

q.3 can i generate automatic No. i.e, serial number in a given sequence. after adding a new data in visual basic.
Feb 20 '08 #1
4 5809
mafaisal
142 100+
Hi,

U can Use DateAdd,DateDiff Functions For this,
in its interval means adding day or month or year by "d" or "m" or "y"

U can Use slno by Getting max(no) +1

Faisal


q.1How to use DTpicker in vb6 add , difference, between two date e.g
one employee date of birth is 15/1/1987. and how we will use dtpicker to calculate its retirement date after completion a service of 57 years.

q.2 How can i calculate the current date in today i.e. 20/02/2008 from his date of birth i.e, 15/01/1987. How many year he complete i.e, age as on 20/02/2008.

q.3 can i generate automatic No. i.e, serial number in a given sequence. after adding a new data in visual basic.
Feb 20 '08 #2
mafaisal
142 100+
Hi

Also Check these Link

Check this

Faisal

q.1How to use DTpicker in vb6 add , difference, between two date e.g
one employee date of birth is 15/1/1987. and how we will use dtpicker to calculate its retirement date after completion a service of 57 years.

q.2 How can i calculate the current date in today i.e. 20/02/2008 from his date of birth i.e, 15/01/1987. How many year he complete i.e, age as on 20/02/2008.

q.3 can i generate automatic No. i.e, serial number in a given sequence. after adding a new data in visual basic.
Feb 20 '08 #3
Expand|Select|Wrap|Line Numbers
  1.  
  2. dim intDateDiff as integer
  3.  
  4.            intDateDiff = datediff(format(dtpPicker1.value,"mm/dd/yyyy"),format(Now,"mm/dd/yyyy")
  5.  
  6.  
  7.  
  8.  
  9.  
Feb 21 '08 #4
debasisdas
8,127 Expert 4TB
To reply your 3rd question.

Find out the count of number of rows and increment that value by 1 to get the next serial number.
Feb 21 '08 #5

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

Similar topics

3
by: Theo | last post by:
Hi Guys, A silly question really, but how do I get the value of a DTPicker. I just need to get the value in session variable and display it on a different page. -----------------------------...
0
by: someone | last post by:
Hi, We are encountering a problem with the DTPicker. This is the situation: We have a DTPicker-control on a VB6 Active-X. The Active-X is used on a .NET winform. the problem: The .Net...
1
by: Nicolae Fieraru | last post by:
Hi All, I made an access Application which uses mailmerge function. I have a query which I use to mailmerge to a word document. I created the word document as a new document and I saved onto the...
0
by: Andreas Belitz | last post by:
Hello, in my project, i use a form with Microsoft's Dte Picker Control (MSComCtl2.DTPicker.2). This control is linked up to a date field of a table. When i open the form, the control always...
1
by: Janaka Wijayakoon | last post by:
Hi Everyone, I have added a DTPicker control to my web form. Its working fine with all the work station where that control is registered (Computers where vb runtime is installed) and dipayls a...
1
by: hemashiki | last post by:
Hi can anyone,elaborate about DTpicker plz
2
by: siyoyok007 | last post by:
Hello, I'm developing simple system, that needs the use of DTPicker. For my system, i have placed two dtpicker, which means DTPicker1 and DTPicker2. The DTPicker1 will be used as starting date and...
1
by: psuaudi | last post by:
I have a form that I was creating and I wanted to use the microsoft date and time picker. in the On_Load event for the form, I want to set the date and time picker value to Now() Private...
1
by: venkatanarasimhaa | last post by:
Hi, I am developing a simple application in VB. I have one DTPicker on my form. If the value of DTPicker is not mindate of DTPicker, It should not be allow us to enter any value earlier than...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.