[Zope] Passing the current date to an SQL query

TMGB bennettt@am.appstate.edu
Mon, 20 Sep 1999 13:37:02 -0400


Here is what I use to put the current date into a MySQL field:
"<dtml-var ZopeTime fmt="19%y-%m-%d">"
1999-04-25



INSERT INTO askref VALUES
(NULL,"<dtml-var ZopeTime fmt="19%y-%m-%d">",
 "<dtml-var username>",
 "<dtml-var phone>",
 "<dtml-var email>",
 "<dtml-var affiliation>",
 "<dtml-var question>",
 'N',
 'N',
 "")


Peter Whysall wrote:
> 
> What's the best way of doing this?
> 
> I'm struggling to find any mention of the *current* date in the
> documentation; I've looked in the Zope DTML User's Guide and the Zope SQL
> Methods User's Guide.
> 
> regards
> 
> Peter.
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
> 
> (To receive general Zope announcements, see:
> http://www.zope.org/mailman/listinfo/zope-announce
> 
> For developer-specific issues, zope-dev@zope.org -
> http://www.zope.org/mailman/listinfo/zope-dev )

-- 
--------------------------------------------------------------------
                      Rock and Rule
             Zope Rocks -- http://www.zope.org
           Python Rules  -- http://www.python.org    
--------------------------------------------------------------------
Thomas McMillan Grant Bennett      Appalachian State University
Computer Consultant II             University Library
bennettt@am.appstate.edu          
http://www.library.appstate.edu/webmaster/
Voice:  828 262 6587	           FAX:    828 262 3001

Windows 95 is a 32-bit extension to a 16-bit patch for an 8-bit
operating system that was originally coded for a 4-bit microprocessor.
 - Chris Dunphy     Boot Magazine