HiI have probem with GetActivationTime() its returns as seconds , how can we convert Date & Time? Thanks!
GetActivationTime() Returns the activation time of this task in seconds since the epoch (i.e., UNIX time), or undef if the task has not been activatedrun perldoc Date::Manip, then RTFM ParseDateString $date = ParseDateString($string); This routine is called by ParseDate, but it may also be called directly to save some time (a negligable amount). NOTE: One of the most frequently asked questions that I have gotten is how to parse seconds since the epoch. ParseDateString cannot simply parse a number as the seconds since the epoch (it conflicts with some ISO-8601 date formats). There are two ways to get this information. First, you can do the following: $secs = ... # seconds since Jan 1, 1970 00:00:00 GMT $date = &DateCalc("Jan 1, 1970 00:00:00 GMT",$secs); Second, you can call it directly as: $date = &ParseDateString("epoch $secs");
my $activated = localtime($task->GetActivationTime());