No -- there's no default set as a string. I believe I have correctly
traced the problem to SQLTABLE using the reformatted datetime, which
comes out of the represent lambda as a string. But I don't see why
SQLTABLE would be running any validation? Does it?

On Jan 31, 2:32 pm, mdipierro <[email protected]> wrote:
> Does you field have a default set as a string instead of a datetime?
>
> On Jan 31, 12:42 pm, weheh <[email protected]> wrote:
>
> > OK, I found out what is wrong. I'm using a "represent" statement that
> > reformats the datetime to be more concise. In the process, the
> > datetime becomes a string. Why this is the case I am still
> > investigating.
>
> > I have a field 'start'. I do
>
> > db.mytable.start.represent=lambda value: dts2myhm(value)
>
> > def dts2myhm(dts):
> >         if dts: return dts.strftime('%m/%d %H:%M')
> >         else: return ''
>
> > Then I do an SQLTABLE, and that's when the trouble starts. Does anyone
> > spot where the problem is? Of course, I already have a solution, which
> > is to remove the represent. It's only for aesthetics.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to