perl set a specific datetime
# For Perl only
# syntax
use DateTime;
my $YourDate = DateTime->new(
year => <your-year>,
month => <your-month>,
day => <your-day>,
hour => <your-hour>,
minute => <your-minute>,
second => <your-second>,
nanosecond => <your-nanosecond>,
);
# example:
use DateTime;
my $YourDate = DateTime->new(
year => 1994,
month => 05,
day => 25,
hour => 13,
minute => 31,
second => 18,
nanosecond => 0,
);
Are there any code examples left?
New code examples in category Perl
-
Perl 2022-01-31 07:16:22 perl format decimal 2 places not rounding
-
Perl 2022-01-30 19:35:07 perl id number validation south africa
-
Perl 2022-01-22 13:46:02 perl add key value pair to hash
-
Perl 2021-11-22 02:55:21 unique in perl
-
Perl 2021-11-13 16:55:08 perl lowercase
-
Perl 2021-11-11 04:30:19 perl write to file
-
Perl 2021-11-06 23:53:11 perl for loop
-
Perl 2021-11-05 18:26:13 perl sprintf YYYYMMDD sample