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. Web Development
  3. ASP.NET
  4. comparing dates

comparing dates

Scheduled Pinned Locked Moved ASP.NET
csharpjavascriptasp-nethelp
3 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
    HowRU
    wrote on last edited by
    #1

    Hi, Help me please... What I want is to compair the start & end date on the web page...as when the user fills the forms details...like date...when he fills the end date after start date i should prompt him that "end date should be greater than start date" ...so for this i ve to compare the two dates....in javascript....i am working in asp.net(C#)... so please help me... Thanks....

    A S 2 Replies Last reply
    0
    • H HowRU

      Hi, Help me please... What I want is to compair the start & end date on the web page...as when the user fills the forms details...like date...when he fills the end date after start date i should prompt him that "end date should be greater than start date" ...so for this i ve to compare the two dates....in javascript....i am working in asp.net(C#)... so please help me... Thanks....

      A Offline
      A Offline
      Aryadip
      wrote on last edited by
      #2

      hi, Checkout the following link to get the javascript function for comparing dates...In the site you will also find a demonstration of the code online. Click here Hope this helps... Regards, Aryadip. Cheers !! and have a Funky day !!

      1 Reply Last reply
      0
      • H HowRU

        Hi, Help me please... What I want is to compair the start & end date on the web page...as when the user fills the forms details...like date...when he fills the end date after start date i should prompt him that "end date should be greater than start date" ...so for this i ve to compare the two dates....in javascript....i am working in asp.net(C#)... so please help me... Thanks....

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

        C# DateTime sDate = DateTime.Now(); DateTime eDate = DateTime.Now(); Timespan t = eDate - sDate; if(t.toMillisecs =< 0) { //the end is before the start } Hop this helps Atul

        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