Checking the dates and times
Show older comments
I am having some trouble with developing code to see if the date inputted for the Testdate is one week old and if the date inputted for the Testdate isn't the current date for today should show an input for an error message to confirm the Testdate they inputted. So far I have:
Testdate=input('What is the test date?(dd-mm-yyyy)','s')
Teststr=convertCharsToStrings(Testdate);
TestT=ERRORT(Testdate);
Then here is the function with the error checking code:
if
Testdate=input('Confirm this test data: Y or N','s')
end
So I also would like if the user inputs Y, it continues to store the value and continue through the main script, but if inputs N, it allows the user to input a different Testdate to store.
Any suggestions or resolutions?
Accepted Answer
More Answers (0)
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!