You can do it with a trick but I cannot promise it will work with the
new DAL

from gluon.sql import SQLXorable
db.define_table(....
    SQLFIELD('add_date', 'datetime', default=SQLXorable("any SQL code
here"))
)

Anyway, I think it works but I am not 100% sure.

Massimo

On Jun 27, 3:24 pm, kuba <[email protected]> wrote:
> On 27 Cze, 22:09, Hans Donner <[email protected]> wrote:
>
> > Have you tried the 'default'  keyword for SQLField?
>
> > SQLFIELD('add_date', 'datetime', default=<insert your default here>)?
>
> yes, I thought also about it.
>
> The problem is that it accepts datetime type (or what ever it is) not
> string
>
> i can only pass request.now to it - and if use crud.create.create()
> with such table it automaticly initialize the field - so if user waits
> some time with button clicking the value is not exacly the time of
> insertion.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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