Thread: date zobject

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Posts
    8
    Rep Power
    0

    date zobject


    I need to get a date object in zope in the format 2003/01/26

    This below will work in IDLE but strftime won't go in zope
    from time import strftime
    strftime("%Y/%m/%d")

    I'd like for this in zpt but I don't know enough of python:modules
    to figure it.

    also a script(python) would do.

    I need to compare zope time formatted 2003/01/26
    using zpt
    against a sql table with preinserted data '2003/01/26'

    for a schedule type thing where zope date changes the appropriate stuff is displayed.

    Thanks;
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Posts
    8
    Rep Power
    0
    this zpt works

    <span tal:replace="python:here.ZopeTime().strftime('%m/%d/%Y')" />


    though I think maybe I want a script(python, perl)

    too

    cmp zopetime == sql date table, display data from zpt calling this object

    and also have the script do some batching so the display can have an <<previous link.

IMN logo majestic logo threadwatch logo seochat tools logo