473,666 Members | 2,131 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems using Dtpicker in VB6

1 New Member
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 5829
mafaisal
142 New Member
Hi,

U can Use DateAdd,DateDif f 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 New Member
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
jimmylee
17 New Member
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 Recognized Expert Expert
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
2996
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. ----------------------------- This message is posted by http://asp.forumszone.com
0
1556
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 winform is: 1. instantiated
1
1890
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 computer. Then, I have a form with a button which runs the query and opens the word document The code which is linked to the button is:
0
6900
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 displays its default date value set in the properties and not the date of the appropriate column of my table. Using VBA and "msgbox"'ing the value of the control, it shows the right value (the one from the table): in the table (1st record) the...
1
2337
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 blank image on other computers. Please help.... Thanks 'n Regards
1
14030
by: hemashiki | last post by:
Hi can anyone,elaborate about DTpicker plz
2
1856
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 DTPicker2 as the end date. How can i calculate the duration between these two DTPicker?... help me please.. Thnx
1
3359
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 On_Load() dtpicker.value = now() end sub However, in the form that I was creating, it says that the dtpicker is read-only and cannot be changed. If I create a blank form and insert a date and time picker, and use the on_load even above, it works...
1
1773
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 the exitsing value of DTPicker. Ex: My DTPicker value is : 1/15/2008 It should not allow any date which is earlier than 1/15/2008 (like 1/14/2008).
0
8356
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
8781
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8551
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8639
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7386
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...
1
6198
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5664
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
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1775
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.