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. Date Difference in Datagridview [modified]

Date Difference in Datagridview [modified]

Scheduled Pinned Locked Moved C#
csharphelpquestion
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.
  • N Offline
    N Offline
    nagendra vk
    wrote on last edited by
    #1

    hi everybody i m using C# Application i have a 'date' and 'days' columns in datagridview now i want to findout the no. of days between two dates how can i calculate pls help me date days -------------------------------------------- 1/11/2008 0 1/12/2008 30 3/12/2008 2 --------------------------------------------

    modified on Monday, May 4, 2009 9:32 AM

    L 1 Reply Last reply
    0
    • N nagendra vk

      hi everybody i m using C# Application i have a 'date' and 'days' columns in datagridview now i want to findout the no. of days between two dates how can i calculate pls help me date days -------------------------------------------- 1/11/2008 0 1/12/2008 30 3/12/2008 2 --------------------------------------------

      modified on Monday, May 4, 2009 9:32 AM

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Example : DateTime d1 = new DateTime(2008, 1, 1); DateTime d2 = new DateTime(2009, 1, 1); TimeSpan ts = d2.Substract(d1); ts.TotalDays <- is the value you want.

      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