How to convert a date to Unix time

F

Francesco Moi

Hello.

I want to convert a date (e.g. '20 january 2001') to Unix
time.

Is there any function, or must I create my own one?

Thank you very much.
 
G

Gunnar Hjalmarsson

Francesco said:
I want to convert a date (e.g. '20 january 2001') to Unix
time.

Is there any function, or must I create my own one?

There is a module:

use Date::parse;
my $date = '20 january 2001';
my $unixtime = localtime str2time($date);
 

Ask a Question

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.

Ask a Question

Members online

Forum statistics

Threads
474,142
Messages
2,570,819
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top