N
news.hinet.net
if i have a date string like 200407221405000 .
how to convert the string to sec from 1971/1/1 like time()?
how to convert the string to sec from 1971/1/1 like time()?
if i have a date string like 200407221405000 .
how to convert the string to sec from 1971/1/1 like time()?
news.hinet.net said:if i have a date string like 200407221405000 .
how to convert the string to sec from 1971/1/1 like time()?
Dangerous Lunatic said:sub utc2seconds {
my $utc = shift @_;
my $YYYY = substr($utc,0,4);
my $MM = substr($utc,4,2);
my $DD = substr($utc,6,2);
my $hh = substr($utc,8,2);
my $mm = substr($utc,10,2);
my $ss = substr($utc,12,2);
return timegm($ss,$mm,$hh,$DD,$MM,$YYYY);
}
...
my $seconds = utc2seconds(200407221405000);
if i have a date string like 200407221405000
how to convert the string to sec from 1971/1/1 like time()?
news.hinet.net said:i dont want to use module.
because i must install those module
"A. Sinan Unur" <[email protected]> ¦b¶l¥ó
i dont want to use module.
because i must install those module
news.hinet.net said:if i have a date string like 200407221405000 .
how to convert the string to sec from 1971/1/1 like time()?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.