This would not work. The reason I need to know this information is so that I
know whether to include the date, time, or both when submitting the data to
a database. The reason your suggestion will not work is because a Date
object ALWAYS has a date and time, even if the date is the default date or
the time is 0:00 or 12:00 or whatever. Therefore, looking at these parts of
the Date will tell me nothing about whether a date, time, or both were
included in the original String.
--
Nathan Sokalski
njsokalski@hotmail.com http://www.nathansokalski.com/
"Spam Catcher" <spamhoneypot@rogers.comwrote in message
news:Xns9A6DDD5D7857Ausenethoneypotrogers@127.0.0. 1...
Quote:
"Nathan Sokalski" <njsokalski@hotmail.comwrote in
news:O8ULZv5jIHA.4376@TK2MSFTNGP04.phx.gbl:
>
Quote:
>When determining whether a String can be converted to a DateTime, you
>can use the IsDate() method. However, I would also like to know
>whether the string is a date, a time, or both a date and a time. Is
>there any simple way to do this without using manual pattern matching?
>Thanks.
>
Perhaps you can use the Convert.ToDate() function? Once you convert it to
a
date, you can check the .Date and .Time properties to determine the
original values?
>
>
>
--
spamhoneypot@rogers.com (Do not e-mail)