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. C#
  4. Time values in datagrid

Time values in datagrid

Scheduled Pinned Locked Moved C#
helpdatabase
2 Posts 2 Posters 0 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.
  • Y Offline
    Y Offline
    yogesh_kumar_agarwal
    wrote on last edited by
    #1

    Hello All I want to retrive the time values stored into the database then i want to display that value into a datagrid but the problem is it will display the date also along with the time but there is no dates stored into the database. plz help me in this issue with code. with regards yogesh agarwal

    M 1 Reply Last reply
    0
    • Y yogesh_kumar_agarwal

      Hello All I want to retrive the time values stored into the database then i want to display that value into a datagrid but the problem is it will display the date also along with the time but there is no dates stored into the database. plz help me in this issue with code. with regards yogesh agarwal

      M Offline
      M Offline
      Mandaar Kulkarni
      wrote on last edited by
      #2

      If you are not directly binding the data to the Grid, you can get the value into DateTime type and use .ToShortTimeString() method and assign to the tinme value. If you are directly binding data to the grid, then you probably have to format the column to time format.Check if DataBound like event is available or not. If you are providing your own SQL for data retrival use TO_CHAR(DATE_COLUMN, 'HH:MM:SS') in sql to get the data in time format.

      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