|
-
Apr 29th, 2002, 04:27 AM
#1
Thread Starter
Hyperactive Member
IsDate function
Is there a another method for IsDate function?
-
Apr 29th, 2002, 04:39 AM
#2
Bouncy Member
why would you want to have another method for a perrfectly good function??
can you give more details please?
-
Apr 29th, 2002, 04:49 AM
#3
Thread Starter
Hyperactive Member
Ok in my program I have 2 text boxes to get start and end dates
I use CDate to convert them to date, but the problem it change the format of the data
If I use IsDate it won’t change but wont convert the text to date.
Now come to think of it, what I mean to ask was Is there a another method for CDate function
-
Apr 29th, 2002, 04:58 AM
#4
check out the Format function - yuo can specify dd/mm/yyyy or whatever you want
-
Apr 29th, 2002, 05:00 AM
#5
Thread Starter
Hyperactive Member
-
Apr 29th, 2002, 05:02 AM
#6
It's too long to eat all of it!
Why not use the MS DatePicker control?
-
Apr 29th, 2002, 05:26 AM
#7
Bouncy Member
wokka has a point!
why use textboxes at all, just use a datepicker control or a monthview - basically something where the user can only pick a date, that way there's no room for error
-
Apr 29th, 2002, 05:51 AM
#8
-
Apr 29th, 2002, 05:58 AM
#9
Thread Starter
Hyperactive Member
When the dates are far apart the giving date manually is much faster than using DatePicker for a good data entry operator
-
Apr 29th, 2002, 07:58 AM
#10
Bouncy Member
why not have both then?
have a textbox with a monthview below it, and make them in tandem with eachother
-
Apr 29th, 2002, 08:06 AM
#11
Why not have:
VB Code:
Option Explicit
Private Sub Form_Load()
Dim lngYear As Long
With cboYear
For lngYear = DatePart("yyyy", Date) - 10 To DatePart("yyyy", Date) + 10
.AddItem lngYear
.ItemData(.NewIndex) = lngYear
Next lngYear
.ListIndex = .ListCount / 2
End With
End Sub
Private Sub cboYear_Click()
dtpDate.Year = cboYear.ItemData(cboYear.ListIndex)
End Sub
Or even have a combo box for month and day as well?
The thing with typing dates into textboxes is that if your PC is set up to American format (GOD FORBID!) then the date 6/2/2002 is 2nd of June!!! Whereas is the PC is in English then it's 6th of February...This can cause god knows how many problems with an application. Your handling of this format has to be spot on and has to take into account that users are stupid 
Forcing them to pick something is by far the best way to do it.
Last edited by Wokawidget; Apr 29th, 2002 at 08:12 AM.
-
Apr 29th, 2002, 08:08 AM
#12
Hyperactive Member
Originally posted by Wokawidget
Whereas is the PC is in English then it's 6th of January...
you sure about that?
-
Apr 29th, 2002, 08:14 AM
#13
Smile, your going to get a carrot...
Nope, I said February...Look above
-
Apr 29th, 2002, 08:15 AM
#14
Bouncy Member
-
Apr 29th, 2002, 08:15 AM
#15
Hyperactive Member
Re: Smile, your going to get a carrot...
Originally posted by Wokawidget
Nope, I said February...Look above
Oh! my most humble apologies, I must have read it wrong!
-
Apr 29th, 2002, 08:16 AM
#16
Lalala, said the sheep before it exploded...
Damn editor text, it records when you edit a post!
Caught red handed 
-
Apr 29th, 2002, 08:22 AM
#17
Bouncy Member
Re: Re: Smile, your going to get a carrot...
Originally posted by GlenW
Oh! my most humble apologies, I must have read it wrong!
me too!
fancy that!!!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|