[Zope] Getting the day from a Timestamp / gvibda

Oliver Sturm sturm@oliver-sturm.de
Tue, 22 May 2001 16:20:22 +0200


On 22.05.2001 15:53:07 +0200 Gitte Wange <gitte@mmmanager.org> wrote:

>> I have a query returning a timestamp column from my interbase 6 database
>> using the Going Virtual database adapter. I want to extract the values of
>> the day/month/year ... from the variable. I tried this
>> 
>> <dtml-var date_column fmt="%d">
>> 
>> for the day, but it doesn't work, probably because the variable's type is
>> not the usual python DateTime. Similarly, this
>> 
>> <dtml-var "_.DateTime(date_column).day()">
> 
> Have you tried with:
> <dtml-var "_.DateTime(date_column).strftime('%d')">

Yes, I had tried that before. It gives me a "NameError" with the "Error
value" being "date_column". Thanks...

Oliver

-- 
Oliver Sturm / <sturm@oliver-sturm.de>