DaveP wrote:
how to validate a date type
is there a isdate() function in c#
or do i write my own
What date type? DateTime? A DateTime instance is always a valid date
and time, though it may fall outside of some range you require.
Or do you mean you want to validate a string to verify it represents an
actual date? You could use DateTime.TryParse() to do that, though of
course there are a wide variety of strings that a human could recognize
as a date but which would fail to be parsed. Still, using TryParse()
should give you results useful in a computer program. :)
Pete