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 6682389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:42:01+00:00 2026-05-26T04:42:01+00:00

I have selected a bunch of data from my access database which one of

  • 0

I have selected a bunch of data from my access database which one of the fields is a DateTime field.

I’m trying to show it formated in a GridView but when I try:

dtlJob.DataSource = genericDataSet
dtlJob.Fields(2).DataFormatString = "{0:d}"
dtlJob.DataBind()

I get this error on line 2

Error   2   'DataFormatString' is not a member of 'System.Web.UI.WebControls.DataControlField'.

How do I format my data?

EDIT

This is my DetailsGridView I’m trying t o show off

<asp:DetailsView ID="dtlJob" runat="server" Height="50px" Width="125px">

</asp:DetailsView>

it has nothing but its tags for I’m fetching every data by code from a database. But I want to format the Data Date Field which is appearing like this no more which data it has
enter image description here

  • 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-26T04:42:02+00:00Added an answer on May 26, 2026 at 4:42 am

    You have to create a BoundField like the code below.

    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="false" Height="50px" Width="125px">
    <Fields>
        <asp:BoundField DataField="Name" HeaderText="Name" />
        <asp:BoundField DataField="Age"  HeaderText="Age" />
        <asp:BoundField DataField="Birth"  HeaderText="Birth" DataFormatString="{0:d}" />
     </Fields>
     </asp:DetailsView>
    

    I hope that helped.

    Vicente

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently we have a table with a bunch of data from a database which
I have a form which has a Combo Box Control. I have selected the
I have two XmlDocuments and I would like to move an XmlNode selected from
I have written a CSS sprite auto-generator which takes selected images out of the
I have a radajaxpanel that is populated with the selected item from a combobox
I have a form with a bunch of checkboxes, and a hidden field that
I have a table with a bunch of data. Each <td> contains class="person" and
I have a Crystal Report I'm trying to recreate from scratch after an update
I have a bunch of radio buttons. They each correspond to a number from
I have a bunch of data tables (In a list), all with 50 columns.

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.