VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. I'm having a problem with a program I am writing. It is a Video Renting program, and to calculate Late Fees I have something similar to:

    Late = (frmvhsout.txtFields(2) <= Date)

    That will return a true or false value. But, when frmvhsout.txtFields(2) is equal to a date older than today's Date or today's date, it gives me a false value.

    I can only assume that I am using the Date function in an improper way.

    Does anyone know how I could fix this? Or a better forum to post this in? Thanks.
    Quote Quote  
  2. Member tekkieman's Avatar
    Join Date
    Mar 2004
    Location
    Over the hill
    Search Comp PM
    It could be moved to the Programming forum .

    Are you using VB or VB.NET?
    Quote Quote  
  3. I didn't know there was a programming forum

    I'm using just VB
    Quote Quote  
  4. Member tekkieman's Avatar
    Join Date
    Mar 2004
    Location
    Over the hill
    Search Comp PM
    Ok, first, you should probably cast the textbox entry to the same datatype using CDate(frmvhsout.txtFields(2).Text). From there, you should be able to compare using Late =(CDate(frmvhsout.txtFields(2).Text)<= Now). My VB is on my test server, and I only have .NET on this machine, but that should work for you.

    If not, let me know, and I'll fire up the other box.
    Quote Quote  
  5. Thanks a lot! I've been trying at that for an hour or more.

    It now works perfectly...or atleast that one line of code
    Quote Quote  
  6. Member tekkieman's Avatar
    Join Date
    Mar 2004
    Location
    Over the hill
    Search Comp PM
    No prob. Just give a yell if you get stuck.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!