Results 1 to 2 of 2
  1. #1

    Default C# help: Datetime intervals


    how to get the difference between one date and another date

    for example

    datetime dt= datetimepicker1.value;
    datetime dt2= datetimepicker2.value;

    int difference= ??;

    saon man mga bro? suwayan nko ang

    dt.CompareTo(dt2);

    but it only gives 3 output...-1 if its less than, 0 if tis the same, 1 if its more than the date

    i want to get the exact number of days na interval nila...pls really need dis ASAP...tnx

  2. #2
    uhmm never mind found the answer na...for future reference ill post it here

    timespan ts= dt - d2;
    days= (int)ts.totaldays;

  3.    Advertisement

Similar Threads

 
  1. help!!! ebay item...
    By ipog in forum Business, Finance & Economics Discussions
    Replies: 23
    Last Post: 08-25-2008, 01:30 PM
  2. HELP ABOUT AVATAR
    By sab0y in forum Support Center
    Replies: 59
    Last Post: 10-09-2007, 12:49 PM
  3. need help with p900
    By kloos in forum Gizmos & Gadgets (Old)
    Replies: 8
    Last Post: 09-04-2006, 01:55 PM
  4. Help Me I Cant Log In
    By mark eugene in forum Support Center
    Replies: 12
    Last Post: 06-06-2005, 02:35 PM
  5. help needed for palm m105
    By eliel73173 in forum Gizmos & Gadgets (Old)
    Replies: 6
    Last Post: 04-29-2005, 01:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top