dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: how to calculate the datediff in my list

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    how to calculate the datediff in my list

    [Originally posted by ultraman_toh]

    >hi, i need help badly... can someone please tell me how i can use my listview.subitems(5), in this case which is a date and calculate the datediff with the current date?
    >this is because, i need to impose a fine on it should the date in my listview.subitems(5) exceed a certain date... thanx!!


  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:how to calculate the datediff in my list

    [Originally posted by Jeff Winn]

    If the date is a standard format used by the computer you just need to do:

    DateDiff("d", CDate(listview.SubItems(5)), Date)

    If the number comes out negative you can reverse the order or just use Abs(). Either one will work fine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center