Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 30th, 2007, 2:51 AM   #1
qlb
Newbie
 
Join Date: May 2007
Posts: 2
Rep Power: 0 qlb is on a distinguished road
a program on date() and Time()

hi,
i need a program in visual basic 6.0 the program is: suppose i put my date of birth in a text box and click on submit button then it will show me the how old am I ? means the total year, month and days from birth date. and the output may be in label or in a text box.

thanks
__________________
link building services and india seo company
qlb is offline   Reply With Quote
Old Jun 10th, 2007, 4:39 AM   #2
mackenga
Professional Programmer
 
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 314
Rep Power: 4 mackenga is on a distinguished road
You'll find that people on forums are unhappy to hold your hand too much on problems as essentially simple as this one. Generally speaking what you want to do is:

In the Click event handler of the submit button, get the value of the .Text property of the text box control. Now you have to parse it to interpret the date - so you need to be quite sure of the format it'll be entered in (you'd probably find it easier to restrict that format by allowing the user to choose from drop-down lists for day, month and year rather than allowing free entry into your text box).

Next up you want today's date, which is the other piece of information your program will need. It can determine that for itself and then you want to get both dates into a comparable format and compare them to see how many years apart they are.

I'm not going to hold your hand through the whole process, but if you have any other specific questions ask away - but check online and check the documentation before asking a person. Computers' time is worth a lot less than peoples' time, so Google before you post! Virtually everything a beginning VB programmer needs to know is out there on the web.
__________________
"I'm not a genius. Why do I have to suffer?"
mackenga is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Date and Time on HTML Form Druid PHP 3 Apr 19th, 2007 5:43 PM
Date Routine tbohon Perl 2 Jan 15th, 2007 11:14 AM
date() Question grimpirate PHP 2 Nov 5th, 2006 6:58 PM
using Text fields in SWT elford Java 4 Dec 27th, 2005 12:38 PM
Time between two dates and times Illuminati Visual Basic .NET 4 Apr 10th, 2005 8:33 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:39 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC