Now()
Hendrik van Rooyen
mail at microcorp.co.za
Sat Apr 28 03:07:49 EDT 2007
"Carsten Haese" <carsten at uniqsys.com> wrote:
> On Thu, 2007-04-26 at 08:42 +0200, Hendrik van Rooyen wrote:
> > Robert Rawlins - Think Blue wrote:
> > >With time depicted to the nearest second, from my background in ColdFusion
> > development we used to have a >datetimeformat() function that I could use as
> > >
> > >DateTimeFormat(now(), yyyy-mm-dd HH:mm:ss)
> > >
> > >Which would give the current time a mask.
> >
> > Here is a hack that does more or less what you want:
> > [snip horrible hack...]
>
> Please tell me you're not seriously suggesting this hack as a solution.
*grin* it is a cut and paste from some of the first python code I wrote.
It has the sole merit that it actually works as advertised, and it shows the
OP that you can actually help yourself if you try...
As I understood it, he was happy with the date - time string he got back,
except that he did not like the microseconds at the end.
I thought that showing him the formatting process from a completely different
start point might encourage him to simply trim off the end bit that he did not
need.
- Hendrik
More information about the Python-list
mailing list