Re[2]: [ZPT] rdb and strftime

matveev@prime.ru matveev@prime.ru
Wed, 26 Jun 2002 12:26:25 +0600


Hello Magnus,

MH> <tr tal:repeat="temperature here/getAllTemperatures">
MH>    <td tal:content="python:temperature['time'].strftime('%Y-%m-%d %H:%M')"/>
MH>    <td tal:content="temperature/value"/>
MH> </tr>

I use and it works:
<div tal:define="banners python:container.sql_banners_select(request)" tal:omit-tag="">
<tr tal:repeat="item banners" bgcolor="#F2F2F2">
  <td tal:content="python:(DateTime(str(item['date_end'])[0:10]).strftime('%d.%m.%Y')) or default" >&nbsp;</td>
  
You can change  [0:10] to [0:16] respectively or other.
Sorry for my English.
  
-- 
Best regards,                          www.uralfirm.ru
Dmitry Matveev                         mailto:matveev@uralfirm.ru