[ic] Number of days between dates
ic at 3edge.com
ic at 3edge.com
Wed Nov 28 17:49:23 EST 2007
Grant writes:
> What do you guys use to determine the time between two dates? > and <
> are great for comparing dates formatted like 20071121 and 20071128 to
> determine their chronological order, but is there a function that can
> be used within IC to determine how many days lie between those dates?
Google came up with the following:
use Date::Calc qw(Delta_Days);
my @today = (localtime)[107,10,28];
$today[0] += 1900;
$today[1]++;
my @fromday = (2007, 9, 13);
my $days = Delta_Days(@birthday, @today);
print "$days days in between\n";
-----------------------------------
So you could see to use Date::Calc or check it out and steal their code for
determining the delta. Maybe this helps.
CU,
Gert
More information about the interchange-users
mailing list