From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uwe Brauer Subject: Re: org table with datestamp convert to csv and then xlsx or ods: problem Date: Tue, 09 Jan 2018 09:23:33 +0100 Message-ID: <87d12j8mpm.fsf@mat.ucm.es> References: <87373hzk6z.fsf@mat.ucm.es> <87incc5vvi.fsf@nicolasgoaziou.fr> <877essxx8y.fsf@mat.ucm.es> <87bmi45sm6.fsf@nicolasgoaziou.fr> <87373gxupd.fsf@mat.ucm.es> <87zi5o4cjk.fsf@nicolasgoaziou.fr> <87y3l8wfdt.fsf@mat.ucm.es> <87vagc4ayo.fsf@nicolasgoaziou.fr> <87shbg1fhl.fsf@mat.ucm.es> <87fu7g3z95.fsf@nicolasgoaziou.fr> <87fu7ghug4.fsf@mat.ucm.es> <87bmi353f8.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYpFf-000812-BA for emacs-orgmode@gnu.org; Tue, 09 Jan 2018 03:27:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYpFc-0008Kq-OB for emacs-orgmode@gnu.org; Tue, 09 Jan 2018 03:27:19 -0500 Received: from [195.159.176.226] (port=43287 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eYpFc-0008Jp-FK for emacs-orgmode@gnu.org; Tue, 09 Jan 2018 03:27:16 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eYpDV-0004R4-1i for emacs-orgmode@gnu.org; Tue, 09 Jan 2018 09:25:05 +0100 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: emacs-orgmode@gnu.org > Uwe Brauer writes: > Ah well, this was a basis to get you started... This one > should work > (defun my-format-timestamps (cell) > (org-quote-csv-field > (replace-regexp-in-string > org-ts-regexp-both (lambda (m) > (format-time-string > (let ((hours? (string-match-p "[0-9]+:[0-9]+" m))) > (funcall (if hours? #'cdr #'car) > org-time-stamp-custom-formats)) > (apply #'encod-time (save-match-data > (org-parse-time-string m))))) > cell))) There is a small misspelling. Should be encode-time not encod-time.