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. how to diffrential between dates?

how to diffrential between dates?

Scheduled Pinned Locked Moved C#
tutorialquestion
5 Posts 3 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.
  • H Offline
    H Offline
    help as an alias
    wrote on last edited by
    #1

    Hi All, Plz give code me code to take a difference between two date (difference must be in the days) one of them is present date other may be any. Thanx in advance,

    R 1 Reply Last reply
    0
    • H help as an alias

      Hi All, Plz give code me code to take a difference between two date (difference must be in the days) one of them is present date other may be any. Thanx in advance,

      R Offline
      R Offline
      RepliCrux
      wrote on last edited by
      #2

      DateTime t = new DateTime(2007,07,17); TimeSpan diff = DateTime.Today.Date.Subtract(t); MessageBox.Show(diff.Days.ToString());

      H 1 Reply Last reply
      0
      • R RepliCrux

        DateTime t = new DateTime(2007,07,17); TimeSpan diff = DateTime.Today.Date.Subtract(t); MessageBox.Show(diff.Days.ToString());

        H Offline
        H Offline
        help as an alias
        wrote on last edited by
        #3

        Thanx It works

        R 1 Reply Last reply
        0
        • H help as an alias

          Thanx It works

          R Offline
          R Offline
          RepliCrux
          wrote on last edited by
          #4

          Pleasure to help!!

          H 1 Reply Last reply
          0
          • R RepliCrux

            Pleasure to help!!

            H Offline
            H Offline
            Harkamal Singh
            wrote on last edited by
            #5

            thanks RepliCrux

            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