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: Mon, 08 Jan 2018 15:04:29 +0100 Message-ID: <877essxx8y.fsf@mat.ucm.es> References: <87373hzk6z.fsf@mat.ucm.es> <87incc5vvi.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53090) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYY5C-00011P-Om for emacs-orgmode@gnu.org; Mon, 08 Jan 2018 09:07:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYY58-0001Jo-Mn for emacs-orgmode@gnu.org; Mon, 08 Jan 2018 09:07:22 -0500 Received: from [195.159.176.226] (port=42009 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eYY58-0001JD-Eh for emacs-orgmode@gnu.org; Mon, 08 Jan 2018 09:07:18 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eYY2x-00018x-Va for emacs-orgmode@gnu.org; Mon, 08 Jan 2018 15:05:03 +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 > Hello, > Uwe Brauer writes: > None. The export to CSV looks correct and complete. Conversion to CSV > does not pretend converting anything else, in particular timestamps, to > another format. Ok, Now how could that be achieved? I seem not the only one missing that a feature. https://lists.gnu.org/archive/html/emacs-orgmode/2016-11/msg00398.html So I googled and I tried https://stackoverflow.com/questions/23297422/org-mode-timestamp-format-when-exported Like (defun org-export-filter-timestamp-remove-brackets (timestamp backend info) "removes relevant brackets from a timestamp" (cond ((org-export-derived-backend-p backend 'latex) (replace-regexp-in-string "[<>]\\|[][]" "" timestamp)) ((org-export-derived-backend-p backend 'orgtbl-to-csv) (replace-regexp-in-string "[<>]\\|[][]" "" timestamp)) ((org-export-derived-backend-p backend 'ascii) (replace-regexp-in-string "[<>]\\|[][]" "" timestamp)) ((org-export-derived-backend-p backend 'html) (replace-regexp-in-string "&[lg]t;\\|[][]" "" timestamp)))) (eval-after-load 'ox '(add-to-list 'org-export-filter-timestamp-functions 'org-export-filter-timestamp-remove-brackets)) (defun org-ascii-timestamp (timestamp _contents info) (format-time-string "%d.%m.%y" (org-read-date nil t (org-timestamp-translate timestamp)))) (add-to-list 'org-export-filter-timestamp-functions #'endless/filter-timestamp) (defun endless/filter-timestamp (trans back _comm) "Remove <> around time-stamps." (pcase back ((or `jekyll `html) (replace-regexp-in-string "&[lg]t;" "" trans)) (`latex (replace-regexp-in-string "[<>]" "" trans)) (`ascii (replace-regexp-in-string "[<>]" "" trans)) (`csv (replace-regexp-in-string "[<>]" "" trans)))) But nothing helped. Thanks Uwe Brauer