I've found the datetime module to be very useful.  Using datetime, you can use its strftime method to format the print method of datetime objects to your hearts content.  Or, use it with matplotlib, and more.  There's also  the mxDatetime modules (though not part of the standard distribution).
<br><br>A datetime example,<br><br>import datetime<br>tNow = datetime.datetime.now()<br>tFmt = tNow.strftime('%Y%m%d%H%M%S')<br><br><div><span class="gmail_quote">On 7/18/06, <b class="gmail_sendername">Alex Mandel</b> &lt;
<a href="mailto:tech_dev@wildintellect.com">tech_dev@wildintellect.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Alex Mandel wrote:<br>&gt; So I was looking at an old post where someone used<br>&gt;<br>&gt; Python 2.3.2 (#0, Dec 11 2003, 12:46:49) [MSC v.1200 32 bit (Unknown)] on<br>&gt; Pocket PC<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; &gt;&gt;&gt; import time
<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; &gt;&gt;&gt; clock=time.clock()<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; &gt;&gt;&gt; local=time.localtime(clock)<br>&gt;&nbsp;&nbsp;&gt;&gt;&gt; &gt;&gt;&gt; local<br>&gt; (2004, 2, 27, 10, 14, 41, 4, -1, -1)<br>&gt;<br>&gt; When I tried to repeat that on my Dell Axim X5 and on the Desktop
<br>&gt; Emulator I always get<br>&gt; (1969,12,31,17...<br>&gt; Any idea how to actually get the time.<br>&gt; All I need is string that has mmddyy like 071806<br>&gt;<br>&gt; I tried:<br>&gt; import time<br>&gt; from time import strftime
<br>&gt; strftime(&quot;%m%d%y&quot;,gmtime())<br>&gt; and got and error<br>&gt; NameError: name 'gmtime' is not defined<br>&gt; if I throw in local from the above code it works except its not the<br>&gt; current time its the default microsoft time.
<br>&gt;<br>&gt; Any ideas? Thanks -<br>&gt; Alex<br>NVM - localtime() worked<br><br>_______________________________________________<br>PythonCE mailing list<br><a href="mailto:PythonCE@python.org">PythonCE@python.org</a>
<br><a href="http://mail.python.org/mailman/listinfo/pythonce">http://mail.python.org/mailman/listinfo/pythonce</a><br></blockquote></div><br>