[Zope] Re: DateTime under phyton script

Juan García García 100022261@alumnos.uc3m.es
Tue, 28 Aug 2001 09:27:30 +0100


Hi,                                                                   
                                                                      
You must change two things,                                           
                                                                      
the first one is to change the type of the three drop-down boxes,     
instead of int, put string,                                           
                                                                      
the second is in the python script, write: starttime =                
DateTime(container.REQUEST.start_year + '/' +                         
container.REQUEST.start_month + '/' + container.REQUEST.start_day)    
                                                                      
I think it will work.                                                 
                                                                      
Bye.                                                                  
                                                                      
>Hi!                                                                  
                                                                      
>I have a form. It contains 3 drop-down boxes, named start_year:int,  
>start_month:int, start_day:int.                                      
>How can I use them, to make a datum object under phyton script?      
>I try                                                                
                                                                      
>starttime = DateTime(container.REQUEST.start_year,                   
>container.REQUEST.start_month, container.REQUEST.start_day)          
                                                                      
>but it gives an error                                                
                                                                      
>Error Type: TypeError                                                
>Error Value: illegal argument type for built-in operation