Tags:
create new tag
view all tags

SID-01383: formula for "days/minutes/seconds from last update"

Status: Answered Answered TWiki version: 4.1.0 Perl version: 5.10
Category: CategoryStatistics Server OS: n/a Last update: 14 years ago

Hi all, i'm trying to build a table that shows info about the topics of my twiki, in particular i need to check if a page becomes out of date, but i didn't manage to retrieve the difference between the current date and the last upated time, i.e. the following is broken:

%CALC{"$TIMEDIFF(%DISPLAYTIME{$hou:$min:$seconds}% , %REVINFO{"$time"}%)"}%

...in the SupportHeader of this site there is a formula that give the info i want, but seems to only works embedded in a FORMATTEDSEARCH table.

I also need to get the info of a generic topic from another topic, which is the topic where i store the info. can anyone teach me how to work this out?

Thanks a lot

p

-- PaoloGallo - 2012-01-20

Discussion and Answer

$TIMEDIFF() expects two serial numbers, so you probably want to use %GMTIME{$epoch}% for the first one. See SpreadSheetPlugin, VarGMTIME2.

-- PeterThoeny - 2012-01-23

Hi, thanks for the reply, i managed to get the info i was looking for with the following:

%SEARCH{ "^MyTopicName$" scope="topic" regex="on" nonoise="on" format="$percntCALC{$FORMATTIMEDIFF(sec, 1, $TIMEDIFF($TIME($date GMT), $TIME(), sec))}$percnt ago"}%

bye

p

-- PaoloGallo - 2012-01-30

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title formula for "days/minutes/seconds from last update"
SupportCategory CategoryStatistics
TWiki version 4.1.0
Server OS n/a
Web server n/a
Perl version 5.10
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2012-01-30 - PaoloGallo
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.