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:22:23 +0100 Message-ID: <87h8rv8mrk.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 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYpBC-0005uB-Rq for emacs-orgmode@gnu.org; Tue, 09 Jan 2018 03:22:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYpBA-00049L-7y for emacs-orgmode@gnu.org; Tue, 09 Jan 2018 03:22:42 -0500 Received: from [195.159.176.226] (port=32988 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eYpBA-00047N-0U for emacs-orgmode@gnu.org; Tue, 09 Jan 2018 03:22:40 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eYp95-0005F5-9F for emacs-orgmode@gnu.org; Tue, 09 Jan 2018 09:20:31 +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))) It does, works like charm, thank you so much. I suggest to include that or a similar function into the org-table-export function!!