[Zope-dev] How to insert time use mysql connection!

Victor.Zhai@ogilvy.com Victor.Zhai@ogilvy.com
Mon, 31 Jan 2000 19:53:54 +0800


   In my project, I want to insert time flag to my Mysql database. I use the following method to do so. But it cannot work.
   My Database structure is:

    ... publishtime DATE NOT NULL ...
To the User's guide of Mysql ,It is said that the format of Date is like: "2000-01-01". So I use <dtml-var Zopetime fmt="%Y-%m-%d">>
Because the result is: "2000-01-01", just fit the format of requirment.
I use it like this:

<!--#sqlvar ProductDb.passcode type=nb optional-->,
                  <dtml-var ZopeTime fmt="%Y-%m-%d">)
But the result is: I see that the content of that field is: "0000-00-00".
Can some one give me some advices!
 Thanks a lot!



"WorldSecure Server <ogilvy.com>" made the following
 annotations on 01/31/00 06:44:31
------------------------------------------------------------------------------
Privileged/Confidential Information may be contained in this message.  If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to email for messages of this kind.  Opinions, conclusions and other information in this message that do not relate to the official business of the Ogilvy Group shall be understood as neither given nor endorsed by it.

==============================================================================