[Zope] Datefields (problem with ZPsycopg and "/"s in dates)
Tim Hawes
tim.hawes@ncmail.net
Wed, 13 Mar 2002 09:29:34 -0500
Joel Burton wrote:
> [ Tim -- Email to you bounces--might want to check your address. ]
Sorry about the email. I switch between several email clients through my day,
and didn't realize Netscape's was not configured. Should be ok, now.
>
> Not seeing the problem. Here's a small test case to make sure this isn't
> a version difference between us. Can you see if this works?
>
> # In psql:
>
> CREATE TABLE datetest(id SERIAL PRIMARY KEY, thedate timestamp);
> [using date rather than timestamp works fine, too]
>
> INSERT INTO datetest (thedate) VALUES ('2001-04-01');
>
> # ZSQL Statement "select"
> # no arguments or parameters
>
> SELECT id, thedate FROM datetest
>
> # Pyscript "pyscript"
> # one parameter: "thedate"
>
> m = thedate.Month()
> return "%s is the cruellest month" % m
>
> # dtml method "dtml"
>
> <dtml-var standard_html_header>
>
> <dtml-in select>
> <dtml-var "pyscript(thedate)">
> </dtml-in>
>
> <dtml-var standard_html_footer>
>
> View "dtml" and I get "April is the cruellest month"
>
> If this works, can you send me a .zexp of your ZSQLMethod, Python Script,
> and DTML Method, plus SQL DDL to create a table like yours?
>
All this works just fine. I haven't a clue in how to create a '.zexp', can you
point me to the docs that say how to do this?
>
> Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton
> Knowledge Management & Technology Consultant