Thanks Rob
I was working on routines to accomplish this, got them working and
then saw a piece of code that used 'if theDOB is a date' to check
validity. Sort of thought 'Oh! all that effort for nothing? Trust Rev
to make it that simple! ' Its good to know that my initial instinct
wasn't too far
Ian,
The humourous
aspect, for me, in all this, is that after writing many lines of code
to achieve a valid date it seems all I needed to do was code
if theDOB is a date. Isn't Revolution wonderful!
Not all that wonderful in this case... because Rev will accept any
number as a valid
Oops!
get systemDateFormat() -- see below
function systemDateFormat
put 1999,1,9,0,0,0,0 into testDate
convert testDate to short system date -- MC pads day/month
regardless of settings
put 2 into characterNumber
repeat while char characterNumber of testDate is in 1,9
add 1 to
Thanks Mark
I'll do that.
--
Regards
Ian
===
Ian McKnight
[EMAIL PROTECTED]
===
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
Hi Ian,
theDOBA is an array containing a date in the form DD MM - one
element per key
[snip]
put the short date into theDateNow
It appears to me that the two dates are in different formats:
DOB = DD MM
theDateNow = MM DD YY
If you computer's date format is set
Just curious... instead of an array...might the dateitems function
(which I use a lot) be more intuitive-helpful?
wherein the order of items is fixed unlike the array hash order?
After validation,
convert tDOB to dateitems
# keep it stored as dateitems list
# access items as needed for ,
On 10/09/06, Sivakatirswami [EMAIL PROTECTED] wrote:
Just curious... instead of an array...might the dateitems function
(which I use a lot) be more intuitive-helpful?
wherein the order of items is fixed unlike the array hash order?
After validation,
convert tDOB to dateitems
# keep it stored
Hi Rob
Yes with further investigation that seems to be my problem. My system
date is DD/MM/ as is my preferred format for the input date - Rev
seems to prefer MM/DD/ and this is where my error was occurring.
Thanks for the advice.
___
Hi
I have a stack which calls for a date to be entered.
As part of the validation checks I split the date into an array.
Once the date has been validated I then want to ensure that it is not
in the future.
So I compare the valid input date with the current date.
The straight comparison code of
I think the main thing is that the keys of an array in Revolution are
not in any particular order, so when you combine TheDOB with /,
you proabaly don't have the elements in the right order (see the
recent the keys of my array thread).
Best,
Mark
On 9 Sep 2006, at 22:50, Ian McKnight
10 matches
Mail list logo