I'm guessing you would probably do it the same way as any other conditional
statement, where the conditional determines the format string to use. What
you will use as the condition may be a little tricky, since it is obviously
quite possible for the user to enter a time of 12:00 AM, so looking at the
time entered would not be enough to determine whether a time was entered.
How you will apply the format string will depend on where you are displaying
the date and possibly a time. If it is simply a TextBox or Label or some
other control with just a simple Text property, you can just use the
DateTime.ToString(formatstring) method. If you are using a databound control
such as a Repeater or DataList, you may need to do it in the ItemDataBound
event. I'm not going to get into details of what you should do, since I
haven't seen your code, but hopefully this can get you started. Good Luck!
--
Nathan Sokalski
http://www.nathansokalski.com/
"dch3" <> wrote in message
news:A52CB169-710C-4321-92B0-...
> Is there a way to conditionally format a dateTime field to produce on
> result
> if the value is 10/31/2008 12:00 AM (user didn't enter a time) and another
> result if the value is 10/31/2008 5:30 PM (user entered a time). I'm
> looking
> for this result...
>
> Value Result
> 10/31/2008 12:00 AM FRI 10/31/08
> 10/31/2008 12:01 AM FRI 10/31/08 12:01 AM
>
> I also need to figure out the cell spacing to force the time onto a
> different line as in
>
> 10/31/2008 12:01 AM FRI 10/31/08
> 12:01 AM
>
> David H