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.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 7 of 7
Thread
-
-
It could be moved to the Programming forum .
Are you using VB or VB.NET? -
Moving to the Programming forum
-
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
-
Calling MediaInfo from Visual Basic to et video info
By SearchQuality in forum ProgrammingReplies: 18Last Post: 2nd Nov 2011, 06:36 -
Attn: All Premiere Pro experts!
By Canon GL-2 Guy in forum Newbie / General discussionsReplies: 1Last Post: 1st Sep 2010, 03:30 -
visual basic code
By kudoshinichi in forum ProgrammingReplies: 1Last Post: 21st Jan 2009, 08:30 -
Programming FFMPEG (Visual Basic)
By Ace-Of-Spades in forum ProgrammingReplies: 4Last Post: 9th Oct 2007, 06:18