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.
+ Reply to Thread
Results 1 to 7 of 7
Thread: ATTN Visual Basic Programmers
Thread
-
I didn't know there was a programming forum

I'm using just VB
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.
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
Similar Threads
-
visual basic code
By kudoshinichi in forum ProgrammingReplies: 1Last Post: 21st Jan 2009, 08:30 -
Visual Basic code
By g_shocker182 in forum ProgrammingReplies: 30Last Post: 9th Aug 2006, 23:40 -
Attn: Visual Effects People - FXhome updates their software!
By thefiddler in forum Latest Video NewsReplies: 0Last Post: 1st Dec 2005, 14:20 -
Visual Basic (6)
By g_shocker182 in forum ProgrammingReplies: 10Last Post: 30th Jan 2004, 20:50 -
Saving in Visual Basic
By g_shocker182 in forum ProgrammingReplies: 16Last Post: 27th Dec 2003, 16:20
Newest guidesLatest tool updatesNew media commentsRecent DVD HacksReplay Video Capture, if you can Watch it, you can Capture it ! and save it to your computer. More info or download trial! About   Advertise   Forum   Forum Archive   RSS Feeds   Statistics   Tools   






Quote
