#!/usr/local/bin/perl use warnings; use strict; use Date::Format; use Date::Parse; my $str = "Thu, 7 Aug 2008 08:35:36 +01:00"; my $time = str2time($str); print qq{time: $time\n}; my $datekey = time2str(q{%Y%m%d}, $time); print qq{datekey: $datekey\n}; __DATA__ ouputs: time: 1218094536 datekey: 20080807
In reply to Re: DateTime conversion
by wfsp
in thread DateTime conversion
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |