Format date and time optional

D

DavidC

I have an asp.net page that has a GridView with bound columns. The date
column is bound to a SQL datetime column. I have the formatting of the bound
date to be Bind("ActivityDate", "{0:M/d/yyyy h:mm tt}") and it works fine.
However, sometimes records do not have a time and show as 7/21/2010 12:00 AM

Is there a way to not show the 12:00 AM as it is irrelevant when no time is
entered? Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top