[Zope] formatting dates

Michael Guerrero mguerrero@tachyon.net
Tue, 18 Mar 2003 09:22:49 -0800


This is a multi-part message in MIME format.

------_=_NextPart_001_01C2ED72.FFF08484
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,
=20
I am having problems formatting a date that I select from my oracle =
database.  The field is an oracle DATE field.  I want to display it as =
MM/DD/YY.  I have tried:
=20
<dtml-in sql_get_invc_date>
  <dtml-var invc_date fmt=3D"%m/%d/%y">
</dtml-in>
=20
The formatting works fine when I use ZopeTime but not when I use a =
dtml-var.
=20
I appreciate your help.
=20
Thanks.
=20
Mike Guerrero

------_=_NextPart_001_01C2ED72.FFF08484
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 HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">


<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D616251817-18032003><FONT face=3DArial=20
size=3D2>Hello,</FONT></SPAN></DIV>
<DIV><SPAN class=3D616251817-18032003><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D616251817-18032003><FONT face=3DArial size=3D2>I am =
having problems=20
formatting a date that I select from my oracle database.&nbsp; The field =
is an=20
oracle DATE field.&nbsp; I want to display it as MM/DD/YY.&nbsp; I have=20
tried:</FONT></SPAN></DIV>
<DIV><SPAN class=3D616251817-18032003><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D616251817-18032003><FONT face=3DArial =
size=3D2>&lt;dtml-in=20
sql_get_invc_date&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=3D616251817-18032003><FONT face=3DArial size=3D2>&nbsp; =
&lt;dtml-var=20
invc_date fmt=3D"%m/%d/%y"&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=3D616251817-18032003><FONT face=3DArial=20
size=3D2>&lt;/dtml-in&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=3D616251817-18032003><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D616251817-18032003><FONT face=3DArial size=3D2>The =
formatting works=20
fine when I use ZopeTime but not when I use a =
dtml-var.</FONT></SPAN></DIV>
<DIV><SPAN class=3D616251817-18032003><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D616251817-18032003><FONT face=3DArial size=3D2>I =
appreciate your=20
help.</FONT></SPAN></DIV>
<DIV><SPAN class=3D616251817-18032003><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D616251817-18032003><FONT face=3DArial=20
size=3D2>Thanks.</FONT></SPAN></DIV>
<DIV><SPAN class=3D616251817-18032003><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D616251817-18032003><FONT face=3DArial size=3D2>Mike=20
Guerrero</FONT></SPAN></DIV></BODY></HTML>

------_=_NextPart_001_01C2ED72.FFF08484--