0

Hello,

I store Date in my database ( in sqlserver 2008 my datatype for this field is Date) however when i display the date in front end (ASP.NET C#) i get Date along with Time 12:00 AM as a default time.

I dont want Time to be displayed in my front end. How to over come this problem??

Solution awaited...


cya
Rohan

3
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by dnanetwork
0

at the time of Binding you can control

<asp id="Label1" runat="server" Label.Text='<%# Eval("CreationDate", "{0:M-dd-yyyy}") %>'>

hope that helps

0

hii,

jbisono

ToShortDateString() method worked!!!

Thanks a lott......

dnanetwork thanks for your suggestion too!! :)

cya
Rohan

0

Hii
dnanetwork ,

Even your code helped!! while binding the date field to the gridview !

thanks...

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.