Hi and thanks for the replies.
It is starting to make a little sense. But its still not that clear...
If I import the DateTime or install and import the mx package.
Where should I then change something in my code?
I guess that I will have to see if the entered number is valid when the user
clicks the submit button.
So it must be when I run my insertevent.py script.
So will I have to import the DateTime modul in my form.script or in my
insertevent.script
And this maybe sound stupid, but will one pls give me an example of what the
code could be for maybe January and February.
I just cant figure out how they work together, the DateTime modul and the
html form.
The user can enter a number in the month field and in the day field. Then
there have to be a tjeck to see if the entered numbers are valid. If the
number entered in the month field is 1 and the number entered in the day
field is 32, there have to come anerror report, and the user will get a
second try to enter the right numbers.
And then if the entered numbers are correct, the data will be inserted in
the database ( But I will work on this if condition myself, I think I can
figure that out:)
So it is just the tjeck to see if the entered numer are valid, I need help
with.
Thanks for all help, it is highly appreciated, and helps me to understand
this new strange but fascinating world of programming.
<gene.tani at gmail.com> wrote in message
news:1111837773.193649.94920 at g14g2000cwa.googlegroups.com...
> get the mx package here:> http://www.egenix.com/files/python/eGenix-mx-Extensions.html#Download-mxBASE> =========================================>>>> import mx.DateTime>>>> print mx.DateTime.DateTime(2004,2,31) # Feb. 31?> Traceback (most recent call last):> File "<stdin>", line 1, in ?> mx.DateTime.RangeError: day out of range: 31>>>>>