On Fri, 5 Aug 2005, Rick Measham wrote:

> Not a bug. Strptime is a ::Format module, all it does is takes a string 
> and returns a DateTime.
> 
> However, once you have your formatter object, it's as simple as calling
>     $formatter->format_datetime( $dt );
> 
> 
> So, putting the whole thing together you get this:
> my $filename = $formatter->format_datetime(
>     $formatter->parse_datetime('200508050801')
>        ->truncate( to => 'month' )
> );
> # 200508010000

Thanks.

> Slipped past you in both the DateTime docs and the Strptime docs as it's 
> discussed in both .. :)

Yeah it's a senior thing you know.  :-)

Again thanks,
Rod
-- 
    "Open Source Software - You usually get more than you pay for..."
     "Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL"


Reply via email to