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

  • SEARCH
  • Home
  • 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 6388303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:15:43+00:00 2026-05-25T03:15:43+00:00

I need to display a datetime column in my gridview, but I don’t want

  • 0

I need to display a datetime column in my gridview, but I don’t want to show millin second for sure. How do I set the format string in gridview to display a datetime data in following format:
08-19-2007 11:09 AM

  • 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-25T03:15:43+00:00Added an answer on May 25, 2026 at 3:15 am

    Use the appropriate DataFormatString for the bound field.

    <asp:BoundField DataField="YourDateField" HeaderText="SomeHeader" 
                        DataFormatString="{0:MM-dd-yyyy hh:mm tt}"  />
    

    Alternatively, you could use DateFormatString="{0:g}" which is the general date/time pattern (short time). It would produce something like 08/19/2007 11:09 AM

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

Sidebar

Related Questions

I need string from datetime to display time in 24 hours format. .. var
I need to display additional information, like a tooltip, but it's a lot of
Hi i need group the records based on the time stmap datetime column 2011-11-23
I need to create LineChart that display datetime points, for example: public var stockDataAC:ArrayCollection
My table is using a datetime (YYYY-MM-DD HH:MM:SS) and i need to display today's
I need to format the time from a DateTime object as a string. The
I need to store user entered changes to a particular table, but not show
i am developing one application with map view i need display the weather depends
I need to display name as dot.. ex:please help me as Please help... like
I need to display an error message on rejecting a drop in my application.

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.