Is there a another method for IsDate function?
:eek:
Printable View
Is there a another method for IsDate function?
:eek:
why would you want to have another method for a perrfectly good function??
can you give more details please?
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
:rolleyes:
check out the Format function - yuo can specify dd/mm/yyyy or whatever you want
:D
Why not use the MS DatePicker control? :rolleyes:
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 :)
I always have a valid point :p
I told my ex, from uni, last night on the fone that I was falling for her again...Ooooooooooooooooops :(
When the dates are far apart the giving date manually is much faster than using DatePicker for a good data entry operator
why not have both then?
have a textbox with a monthview below it, and make them in tandem with eachother :)
Why not have:
Or even have a combo box for month and day as well?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
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 :D
Forcing them to pick something is by far the best way to do it.
you sure about that?:confused: :DQuote:
Originally posted by Wokawidget
Whereas is the PC is in English then it's 6th of January...
Nope, I said February...Look above :D
:p :p :p :p :p
assume the users are stupid eh?
:D
Oh! my most humble apologies, I must have read it wrong! :rolleyes:Quote:
Originally posted by Wokawidget
Nope, I said February...Look above :D
Damn editor text, it records when you edit a post!
Caught red handed :(
:mad:
me too!Quote:
Originally posted by GlenW
Oh! my most humble apologies, I must have read it wrong! :rolleyes:
fancy that!!!!! :D