[Zope-DB] DMTL and DateTime or... mxDateTime
Thu, 8 May 2003 13:44:31 -0500
Here's a DTML Method using the year method of a DateTime object:
I can access this as "Anonymous User" with no trouble. Are you sure
the variable you are working with is a DateTime object? Without any
more details, I can't think of what is wrong except that your role
does not have the permission which allows access to the year method
on the object in question.
Analytic Innovations, LLC
From: email@example.com [mailto:firstname.lastname@example.org]On Behalf Of
Sent: Thursday, May 08, 2003 1:21 PM
Subject: Re: [Zope-DB] DMTL and DateTime or... mxDateTime
hum... i've tried this before and what happens when i do this is i get a
login prompt put up infront of me... and even if i do login using a
valid account... it is in a loop of login.
if i cancel the login i get:
Error Type: Unauthorized
Error Value: You are not allowed to access year in this context
and i truly have been disconnected too, since to do anything else at
this point, i have to relog in.
Eric Kamm wrote:
>Search for "datetime" in the Zope help system and then
>read about the methods the DateTime object supports.
> <dtml-var "start_date.year()">
> <dtml-var "start_date.AMPMMinutes()">
>The DateTime object has dozens of very useful methods
>to help you with rendering among other things.
>Analytic Innovations, LLC
>From: email@example.com [mailto:firstname.lastname@example.org]On Behalf Of
>Sent: Thursday, May 08, 2003 10:59 AM
>Subject: [Zope-DB] DMTL and DateTime or... mxDateTime
>i was wondering of if someone could give me an example of manipulating
>dates in dmtl... like for example with the folloing snipit:
><dtml-var task>, <dtml-var start_date> <br>
>all that is meaningful is the date, in fact just the year in this case.
>but, by default, with postgres and psycopy, i am getting the date and
>the time. i tried, form the DateTime definitions get it to change the
>date to just year... but in several of the permutations that i have
>tried it actually seem to send zope off to nana land (ie: non responsive).
>so... i was hoping that i could be given enough of an example to know
>how to get back the year, and also how one would sperate out a date and
>time. so that i could move on... also, since i have mxDateTime
>installed, and there is a lot of indications that it is "better". if i
>use that instead, is the answer effectivly the same or does it have a
>Zope-DB mailing list
Zope-DB mailing list