In an ASP.NET page I have this:
<asp:Label ID="MyDateTimeLabel" runat="server"
Text='<%# Eval("MyDateTime") %>' />
I'd like to have it formatted like
... Eval("MyDateTime", "{0:d}") ... // Display only the date
if and only if the time part of MyDateTime is 00:00:00. Otherwise like this:
... Eval("MyDateTime", "{0:g}") ... // Display date and time in hh:mm format
Is this possible and how can I do that?
Thank you for hints in advance!