in reply to Re: MySQL datetime
in thread MySQL datetime
am confused with this example, tho i want to compare from current to last update time like this way without using sub
use strict; use warnings; use Time::Piece; use Time::Seconds qw/ ONE_DAY /; my $last_update = ('2025-06-30 14:40:26'); my current_date = localtime; if ($last_update < 20) { print "20 days havent passed\n"; } else { print "20 days have passed\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: MySQL datetime
by hippo (Archbishop) on Jul 01, 2025 at 14:58 UTC | |
by joyfedl (Acolyte) on Jul 01, 2025 at 15:21 UTC |