Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7414085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:00:10+00:00 2026-05-29T07:00:10+00:00

Possible Duplicate: Format Date in Bind Statement inside a ListView I have modified a

  • 0

Possible Duplicate:
Format Date in Bind Statement inside a ListView

I have modified a master detail gridview example as per my requirement. It is working fine but date format in one of cell is displaying as “12/12/2012 12:00:00 AM”. I just want to show only “12/12/2012″. Please help, code is as below”

<asp:TemplateField HeaderText="Date of Failure" SortExpression="Failure_date" >
<EditItemTemplate>
<asp:TextBox ID="EditFailure_date" runat="server" Columns="20" MaxLength="50" Text='<%# Bind("Failure_date") %>'></asp:TextBox>
<asp:RequiredFieldValidator ID="Failure_dateRequiredFieldValidator" runat="server" ControlToValidate="EditFailure_date" Display="Dynamic"  ErrorMessage="Can not be blank" SetFocusOnError="True"></asp:RequiredFieldValidator>
 </EditItemTemplate>
 <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
 <HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" />
 <ItemTemplate>
 <asp:Label ID="Failure_date" runat="server"  Text='<%# Bind("Failure_date") %>' ></asp:Label>
 </ItemTemplate>
 </asp:TemplateField>  
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T07:00:11+00:00Added an answer on May 29, 2026 at 7:00 am

    This is the format that you should use:

    <%# Bind("Failure_date", "{0:dd/MM/yyyy}") %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Converting date From one format to another I have a date, for
Possible Duplicate: PHP/MySQL - Format date/time I have input field (name:day1 and varchar) to
Possible Duplicate: how to convert seconds_since_the_beginning_of_this_epoch to date format in java..? hi i have
Possible Duplicate: How to format a JSON date? I have the following result from
Possible Duplicate: Convert one date format into another in PHP I have a date
Possible Duplicate: Converting string to MySQL timestamp format in php Given a date in
Possible Duplicate: How can I subtract a day from a python date? I have
Possible Duplicate: Format numbers in javascript I have a string represents a number: 3507654
Possible Duplicate: Format date in SELECT * query How to get a date format
Possible Duplicate: PHP: Convert uncommon date format to timestamp in most efficient manner possible?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.