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. Visual Basic
  4. Need help with Date

Need help with Date

Scheduled Pinned Locked Moved Visual Basic
csharphelptutorial
3 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.
  • X Offline
    X Offline
    XGaMeS
    wrote on last edited by
    #1

    I need some information on how to calculate year's difference between two date. And if there is such a function already existing in dotnet for that kind of operations. Thank you in advance. :-D I am a not so total newbie

    X S 2 Replies Last reply
    0
    • X XGaMeS

      I need some information on how to calculate year's difference between two date. And if there is such a function already existing in dotnet for that kind of operations. Thank you in advance. :-D I am a not so total newbie

      X Offline
      X Offline
      XGaMeS
      wrote on last edited by
      #2

      For those with same problem, there is a method substract who can help you very much ;) I am really a newbie

      1 Reply Last reply
      0
      • X XGaMeS

        I need some information on how to calculate year's difference between two date. And if there is such a function already existing in dotnet for that kind of operations. Thank you in advance. :-D I am a not so total newbie

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

        This is for VB6... not sure about .net Say your first date is 20/12/2000 and your second date is 15/12/2004 Dim strDate1 As String Dim strDate2 As String Dim strDifference As String strDate1 = "20/12/2000" strDate2 = "15/12/2004" strDifference = DateDiff("yyyy", strDate1 , strDate2) msgbox strDifference 'This will be 4 years Dont know if that is what you were looking for?? Anyway... Later

        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