TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mohit Sharma
NA
1
7.3k
Date time Formate in Datagrid ItemTemplate
Dec 3 2008 5:58 AM
Hi
can any one help me? I have a datetime field in a SQL Server 5.0 database that is bound to a DataGrid Item template.
I really only want to display the time portion of the field i.e. hh:mm:ss. I need to specify a custom format specifier
but have not been able to find any specific examples that fit my circumstance.
<asp:TemplateField HeaderText="Created Date">
<HeaderStyle Width="10%" />
<ItemStyle ForeColor="#ffffcc" HorizontalAlign="center" />
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Time").ToString("hh:mm:ss") %>
</ItemTemplate>
</asp:TemplateField>
Reply
Answers (
1
)
Advantages of AJAX
Rating Tool in GridView