[Zope] Splitting a datetime string into a date string and a time string
Gitte Wange
gitte@mmmanager.org
Thu, 17 May 2001 14:48:38 +0200
Well I don't know much about it but I'm learning :-)
I guess if I do something like:
<dtml-var StartDate fmt="%Y/%m/&d">
<dtml-var StartTime fmt="%H:%M:%S">
That will do the displaying.
But how do I then make a string (need to use it in a filename) that looks
like: YYYYMMDDHHMMSS
?
Regards
Gitte Wange
On Thursday 17 May 2001 13:00, Tino Wildenhain wrote:
> Hi Gitte,
>
> assuming you only want to display the date,
> you could use the fmt-attribute of the dtml-var tag.
> <dtml-var YourDate fmt="%Y %m %d">
> <dtml-var YourDate fmt="%H:%M:%S">
>
> You can also use:
>
> <dtml-var "YourDate.strftime('%Y %m %d')"> respectively.
>
> HTH
> Tino Wildenhain
> --On Donnerstag, 17. Mai 2001 11:29 +0200 Gitte Wange <gitte@mmmanager.org>
>
> wrote:
> > Hello,
> >
> > I have a small problem:
> > In my database I have a datetime field.
> > Now I need to split the content of that field into a date string and a
> > time string with these formats:
> > date: YYYY/MM/DD
> > time: HH:MM:SS
> >
> > How do I do that?
> >
> > Another thing:
> > I also need to remove / : and spaces from the datetime string.
> >
> > How ?
> >
> > Regards
> > --
> > ************************
> > Gitte Wange Jensen
> >
> > System Squid Developer
> > MMManager Aps
> > +45 29 72 79 72
> >
> > gitte@mmmanager.org
> > ************************
> >
> > _______________________________________________
> > Zope maillist - Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > ** No cross posts or HTML encoding! **
> > (Related lists -
> > http://lists.zope.org/mailman/listinfo/zope-announce
> > http://lists.zope.org/mailman/listinfo/zope-dev )