How to validate date in an application should not accept less than future date. - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: How to validate date in an application should not accept less than future date. (/Thread-How-to-validate-date-in-an-application-should-not-accept-less-than-future-date) |
How to validate date in an application should not accept less than future date. - ruchi03 - 08-09-2014 Hi, Recently i have been asked a question in an interview where, I have to validate that the application should not accept the date less that the current date. hoe to write the VB script code for this? The condition is application does not keep tracks of the date, but when i am entering the date it in a field and submitting the record it should not submit the record if the date is less than T+1. (T=current date). Helps are much appreciated. Thanks. RE: How to validate date in an application should not accept less than future date. - rajkumarsm - 10-08-2014 Hope the below code works out 'I have to validate that the application should not accept the date less that the current date. hoe to write the VB script code for this? Code: inputdate = cdate(Inputbox("Enter Date")) '10/8/2014 'The condition is application does not keep tracks of the date, but when i am entering the date it in a field and submitting the record it should not submit 'the record if the date is less than T+1. (T=current date). Code: inputdate = cdate(Inputbox("Enter Date")) '10/8/2014 |