I try to consider that a field defined as Date is a Date in the python 
sense, not a string representation. In some backends it may be a stored as 
a string, but I consider that the private business of the database. The DAL 
gives back a Date. 
(If it was stored as a string I would hope that it was ISO format, 
YYYY-MM-DD). 

But really, it's a Date. You can convert Dates to strings with the Python 
dateutil library. 

As for datepicker, this thread may help (or search for datepicker localise):

https://groups.google.com/forum/#!searchin/web2py/datepicker$20date$20format/web2py/pvAbhedCPIg/wpj-u_22xG4J







On Sunday, 2 March 2014 03:49:36 UTC+11, Gael Princivalle wrote:
>
> Hello all.
>
> I'm a little bit disappointed by the date format and datepicker.
>
> First my field was like that:
>
> Field('concert_date', type='date'),
>
> On Firefox no problem. It give me automaticly the possibility to put in 
> the field the local %d/m/%Y format, and this format was accepted by the 
> DAL. When I open this row, date is ok.
>
> As Firefox 27 for Windows is incredibly slow, I'm still using Chrome from 
> this morning.
>
> With Chrome if I open again this row date it's ok but with the US format 
> %Y-%m-%d. For example 12/03/2014 change in 2014-03-12. It's the default SQL 
> Lite date format, why not.
>
> But if I open datepicker, it shows me on the calendar September 4 2017.
>
> What I want to do is:
> Choose with datepicker the date format always like %d/m/%Y.
> Saving the date in DAL as US format %Y-%m-%d
> Showing in the row the date format as local (%Y-%m-%d or %d/m/%Y)
>
> Can you help me ?
>
> Thanks, regards.
>
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to