>
> Could you please give me a piece of advice which option is preferable 
> to use: 
> {{=db.contracts.date_start.represent(row.date_start)}} 
> {{=row.date_start.strftime("%d.%m.%Y")}} ??? 
>

Either one is fine. The advantage of the first is that you only have to 
specify the date format once -- when defining the field's "represent" 
attribute.

And how to deal with input fields in my forms?


If you are using the datepicker that is included with the web2py "welcome" 
app, you will notice that the date and datetime formats are set in 
Javascript in web2py_ajax.html:

    var w2p_ajax_date_format = "{{=T('%Y-%m-%d')}}";
    var w2p_ajax_datetime_format = "{{=T('%Y-%m-%d %H:%M:%S')}}";

As you can see, the formats are translated, so if you want to set a 
different format, you can use the translator, as you have already tried.

Anthony

Reply via email to