This prints "41338 days".#!/usr/bin/perl use strict; use warnings; use Time::Piece; my $datf = Time::Piece->strptime("1/1/1904", "%d/%m/%Y"); my $datt = Time::Piece->strptime("5/3/2013", "%d/%m/%Y"); my $diff = $datt - $datf; my $result = $diff->days + 1462; print "$result days\n";
In reply to Re: days between dates
by vagabonding electron
in thread days between dates
by StayTheCourse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |