<?xml version="1.0" encoding="windows-1252"?>
<node id="1004356" title="Re: Want to format date and time" created="2012-11-17 17:50:25" updated="2012-11-17 17:50:25">
<type id="11">
note</type>
<author id="880879">
space_monk</author>
<data>
<field name="doctext">
&lt;p&gt;Well the current local time is returned by &lt;b&gt;localtime&lt;/b&gt;
&lt;/p&gt;

&lt;p&gt;Formatting that time can be done in many different ways in Perl. The quickest way is probably to use the Posix &lt;b&gt;strftime&lt;/b&gt; function.

&lt;p&gt;Putting the two together gives:&lt;/p&gt;
&lt;code&gt;
use POSIX;

print strftime( "%d/%y/%Y", localtime());
&lt;/code&gt;

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-880879"&gt;
A Monk aims to give answers to those who have none, and to learn from those who know more.
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1004324</field>
<field name="parent_node">
1004324</field>
</data>
</node>
