"be consistent" | |
PerlMonks |
Re: I can't subtract one DateTime object from another to get a DateTime::Duration in daysby 1nickt (Canon) |
on May 10, 2021 at 23:59 UTC ( [id://11132363]=note: print w/replies, xml ) | Need Help?? |
Hi, how do I get the difference in days between two DateTime objects? https://metacpan.org/pod/DateTime#$dt-%3Edelta_days($datetime)
The $dt->delta_days method returns a duration which contains only days.
Hope this helps!
The way forward always starts with a minimal test.
In Section
Seekers of Perl Wisdom
|
|