Okay, unless I'm missing something your answer only works for creation
time. I want it to record modification time, which is different then
creation time (except of course at the time of creation, in which case
they'd be the same thing.)
Thanks
Sam
On Sun, Aug 17, 2008 at 4:45 AM, Petr Jakeš <[EMAIL PROTECTED]> wrote:
>
>> I'd like to be able to create a timestamp column called "mtime" in some of
>> my columns. This would hold a timestamp of when the row was last modified.
>>
>> But I'd like the timestamp to be updated automatically whenever sqlobject
>> updates anything else in the row.
>>
>> How can I do this? I'd like a solution that is easy to add to any
>> table....maybe so easy that the table only has to have a column called mtime
>> and then everything happens without anything extra on my part.
>>
>> Thanks
>>
>
> from datetime import datetime
> tStamp = DateTimeCol(default=datetime.now)
>
> HTH
>
> Petr Jakes
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss