If it does not support it, I cannot think of a better way. On Wednesday, 12 February 2014 11:31:06 UTC-6, Tim Nyborg wrote: > > I'm connecting to an MSSQL 2005 db, which only has the Datetime format > (Date was added in 2008). > Is there a standard way to treat a Datetime as a Date in web2py for forms > and formatting? > > I've done the following, and it works thus far, but it seems a bit hackish. > Field('BirthDte', 'datetime', > widget=SQLFORM.widgets.date.widget, > requires=IS_DATE(), > represent = lambda value, row: value.strftime("%#d %b %Y")) > >
-- 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.