![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Apr 2005
Posts: 10
Rep Power: 0
![]() |
Hey guys, basically what I have is a date variable in the following format: mm/dd/yyyy and I'm trying to allow the user to add either days, months or years to this date by typing the following into a text box: 5 Days or 10 Months or 20 Years etc etc etc. Basically a number then a space then what they're adding(Days, Months, or Years).
I'm having trouble figuring out how to make it so it reads the number part and just takes that and adds it to a specified field in the date. Could anyone help me on this? Thanks. |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Oct 2006
Posts: 146
Rep Power: 2
![]() |
set an integer = to each component of the date,
then on Text1_Changed sub procedure have it so that it takes the val(text1.text) and sets that to another variable, having it take the val of the string entered into the textbox takes only the number part provided they typed like 12 months and not like 12 mon23432ths343242 and then read the string for "month, day, year" store the last part of string (the "month" "day" or "year") to a variable and do a select case case "month" store numeric variable (the val(text1.text)) in place of month and so on.... |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding a # value to the end of another variable | kworden | PHP | 6 | Dec 13th, 2006 12:26 PM |
| converting string to float | beginnerCCC | C | 22 | Oct 2nd, 2006 11:59 PM |
| Compiling Maverik 6.2 (from C) | megamind5005 | C | 16 | May 3rd, 2006 5:41 PM |
| Php Postgresql Class | Pizentios | Show Off Your Open Source Projects | 15 | Jun 28th, 2005 9:55 AM |
| Pointers in C (Part II) | Stack Overflow | C | 2 | Apr 29th, 2005 10:39 AM |