Greetings,
I've used the IsDate successfully to check if a date within a text box is
valid.
When you enter the textbox the date is set to todays date and formatted
dd/mm/yyyy
txtDateAdmitted.Value = Format(Now, "dd/mm/yyyy")
However I would like to be flexiable and allow the user to enter date in any
format and then later apply the formatting of 'dd/mm/yyyy'
So far I have done this aslong as ISdate(textbox1.value) returns TRUE.
However to be more efficent how do I check the ISDate and the format is
dd/mm/yyyy ??
I've tried below but its syntically incorrect.
ElseIf IsDate(txtDateAdmitted.Value) And Not Format(txtDateAdmitted.Value,
"dd/mm/yyyy") Then
Cheers
Rob W
Dave Peterson - 06 Dec 2007 23:53 GMT
For the most part, I don't think you can.
How will your program ever decide what I meant when I typed:
01/02/2007
Should it be processed as January 2, 2007 or should your code treat it as
February 1, 2007?
You may want to drop the textbox and use an unambiguous way of getting the date.
Ron de Bruin shares calendar control instructions here:
http://www.rondebruin.nl/calendar.htm
> Greetings,
>
[quoted text clipped - 19 lines]
> Cheers
> Rob W

Signature
Dave Peterson