Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. LINQ
  4. How to display day month year only in datatable column

How to display day month year only in datatable column

Scheduled Pinned Locked Moved LINQ
tutorial
3 Posts 3 Posters 6 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    linqabc
    wrote on last edited by
    #1

    i have datatable contain id name ,date (smalldatetime) i want to fill gridview by this datatable but in date columns display only daymonthyear

    S 1 Reply Last reply
    0
    • L linqabc

      i have datatable contain id name ,date (smalldatetime) i want to fill gridview by this datatable but in date columns display only daymonthyear

      S Offline
      S Offline
      Sreekanth Mohan
      wrote on last edited by
      #2

      Hi, Take records to a list. Inside a for loop assign ony date component to the date field.

      S 1 Reply Last reply
      0
      • S Sreekanth Mohan

        Hi, Take records to a list. Inside a for loop assign ony date component to the date field.

        S Offline
        S Offline
        SeanKuehnel
        wrote on last edited by
        #3

        if you are using a BoundColumn control within your gridview you should be able to use the following method to help you: DataFormatString="{0:MM/dd/yyyy}".

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups