From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Borkowski Subject: Re: Sum clocks into a custom property Date: Mon, 12 Nov 2018 11:42:53 +0100 Message-ID: <87a7mepoeq.fsf@mbork.pl> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gM9i7-0004js-0A for emacs-orgmode@gnu.org; Mon, 12 Nov 2018 05:44:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gM9i3-0005ar-3E for emacs-orgmode@gnu.org; Mon, 12 Nov 2018 05:44:50 -0500 Received: from mail.mojserwer.eu ([195.110.48.8]:40950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gM9i2-0005Pt-Qe for emacs-orgmode@gnu.org; Mon, 12 Nov 2018 05:44:47 -0500 In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Leo Alekseyev Cc: Emacs orgmode On 2018-11-12, at 11:35, Leo Alekseyev wrote: > I am using org-invoice.el, which expects either CLOCKSUM or WORK properties > to exist in an item; these properties contain some time duration record in > HH:MM format. > > I can't figure out how to generate those properties from a series of clock > entries with any built-in user-facing functions, so I want to do it > programmatically -- I can get the sum of the clock entries > via (org-clock-sum-current-item), but how do I convert them to HH:MM format > and insert it as a property? For converting to hh:mm format, see the `format-seconds' function (built into Emacs). Hth, -- Marcin Borkowski http://mbork.pl