[Zope] (correct)How to customize my date?

Angietel angietel@hotmail.com
Thu, 15 Feb 2001 10:04:53 +0800


This is a multi-part message in MIME format.

------=_NextPart_000_001E_01C09736.BD8DF840
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

For my 'lastmodify' datatype is TIMESTAMP(14)
=20
In my search result screen i tried to put the <dtml-var> attribute like =
this:-
<dtml-var lastmodify fmt=3D"%d-%m-%y %H:%M">

 but it return this result:-
Zope Error
Zope has encountered an error while publishing this resource.=20

Error Type: TypeError
Error Value: illegal argument type for built-in operation



-------------------------------------------------------------------------=
-------

Troubleshooting Suggestions

  a.. The URL may be incorrect.=20
  b.. The parameters passed to this resource may be incorrect.=20
  c.. A resource that this resource relies on may be encountering an =
error.=20
For more detailed information about the error, please refer to the HTML =
source for this page.=20

If the error persists please contact the site maintainer. Thank you for =
your patience.=20


And i tried to use the namespace like this=20
<dtml-call REQUEST.set('_.['lastmodify']','b')>

<dtml-var b fmt=3D"%d-%m-%y %H:%M">

it return the attribute error:
Zope Error
Zope has encountered an error while publishing this resource.=20

Error Type: TypeError
Error Value: illegal argument type for built-in operation



-------------------------------------------------------------------------=
-------

Troubleshooting Suggestions

  a.. The URL may be incorrect.=20
  b.. The parameters passed to this resource may be incorrect.=20
  c.. A resource that this resource relies on may be encountering an =
error.=20
For more detailed information about the error, please refer to the HTML =
source for this page.=20

If the error persists please contact the site maintainer. Thank you for =
your patience.=20


Can u tell me how to display my date as :=20
2001-02-08 04:41 PM=20

------=_NextPart_000_001E_01C09736.BD8DF840
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2919.6307" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>For my 'lastmodify' datatype is=20
TIMESTAMP(14)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>In my search result screen i tried to =
put the=20
&lt;dtml-var&gt; attribute like this:-</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&lt;dtml-var&nbsp;lastmodify =
fmt=3D"%d-%m-%y=20
%H:%M"&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>&nbsp;<FONT face=3DArial size=3D2>but it return this =
result:-</FONT></DIV>
<H2><FONT face=3DArial size=3D2>Zope Error</FONT></H2>
<P><FONT face=3DArial size=3D2>Zope has encountered an error while =
publishing this=20
resource. </FONT></P>
<P><FONT size=3D2><FONT face=3DArial><STRONG>Error Type:=20
TypeError</STRONG><BR><STRONG>Error Value: illegal argument type for =
built-in=20
operation</STRONG><BR></FONT></FONT></P><FONT face=3DArial size=3D2>
<HR noShade>
</FONT>
<P><FONT face=3DArial size=3D2>Troubleshooting Suggestions</FONT></P>
<UL>
  <LI><FONT face=3DArial size=3D2>The URL may be incorrect. </FONT>
  <LI><FONT face=3DArial size=3D2>The parameters passed to this resource =
may be=20
  incorrect. </FONT>
  <LI><FONT face=3DArial size=3D2>A resource that this resource relies =
on may be=20
  encountering an error. </FONT></LI></UL>
<P><FONT face=3DArial size=3D2>For more detailed information about the =
error, please=20
refer to the HTML source for this page. </FONT></P>
<P><FONT face=3DArial size=3D2>If the error persists please contact the =
site=20
maintainer. Thank you for your patience. </FONT></P>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>And i tried to use the namespace like =
this=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&lt;dtml-call=20
REQUEST.set('_.['lastmodify']','b')&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial =
size=3D2>&lt;dtml-var&nbsp;b=20
fmt=3D"%d-%m-%y %H:%M"&gt;</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>it return the attribute =
error:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<H2>Zope Error</H2>
<P>Zope has encountered an error while publishing this resource. </P>
<P><STRONG>Error Type: TypeError</STRONG><BR><STRONG>Error Value: =
illegal=20
argument type for built-in operation</STRONG><BR></P>
<HR noShade>

<P>Troubleshooting Suggestions</P>
<UL>
  <LI>The URL may be incorrect.=20
  <LI>The parameters passed to this resource may be incorrect.=20
  <LI>A resource that this resource relies on may be encountering an =
error.=20
</LI></UL>
<P>For more detailed information about the error, please refer to the =
HTML=20
source for this page. </P>
<P>If the error persists please contact the site maintainer. Thank you =
for your=20
patience. </P></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;</DIV></FONT>
<DIV><FONT face=3DArial size=3D2>Can u tell me how to display my date as =
:=20
</FONT></DIV>
<DIV class=3Dlist-item><FONT face=3DArial size=3D2>2001-02-08 04:41 PM=20
</FONT></DIV></BODY></HTML>

------=_NextPart_000_001E_01C09736.BD8DF840--