[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Appendix B: API Reference

webmaster@zope.org webmaster@zope.org
Wed, 13 Nov 2002 11:46:17 -0500


A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/AppendixB.stx#3-89

---------------

      See Python's
      "time.strftime":http://www.python.org/doc/current/lib/module-time.html
      function.

        % Anonymous User - Nov. 13, 2002 11:38 am:
         This is so frustrating. How about an example of some of this usage - from this I 
         never would have guessed that the way to call DateTime in a DTML method was: 

         <dtml-var expr="_.DateTime()">

         And I STILL can't guess how to call strftime within a DTML method.  Anybody care
         to clairify this?

        % Anonymous User - Nov. 13, 2002 11:46 am:
         After trying many things I found that this works:

         <dtml-var expr="_.DateTime().strftime('%Y/%m/%d %H:%M:%S')">

         Is there a better way to handle this?