From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pierre Rouleau Newsgroups: gmane.emacs.help Subject: Re: Get current date and time as a string? Date: Wed, 22 May 2024 14:18:19 -0400 Message-ID: References: <26189.54659.295857.993689@woitok.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35535"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help-Gnu-Emacs@gnu.org To: Dr Rainer Woitok Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 22 20:19:08 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s9qYO-00095A-BM for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 22 May 2024 20:19:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9qXt-0004Ze-SL; Wed, 22 May 2024 14:18:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9qXr-0004YH-Du for Help-Gnu-Emacs@gnu.org; Wed, 22 May 2024 14:18:35 -0400 Original-Received: from mail-vs1-xe2e.google.com ([2607:f8b0:4864:20::e2e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s9qXp-0002Hu-N7 for Help-Gnu-Emacs@gnu.org; Wed, 22 May 2024 14:18:35 -0400 Original-Received: by mail-vs1-xe2e.google.com with SMTP id ada2fe7eead31-47eeb28c44bso1556526137.1 for ; Wed, 22 May 2024 11:18:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716401912; x=1717006712; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ZT2k1mjt88hgM4p0Kqt81UIXI9P2Situq/q5i6oJluk=; b=Pb1Qxy8AHzmJ7plzoS1ip8OBYDGZ6qHfd6PWVfIMJYb53WUGEY2DD1JFKRyCGGidfK io5CAwcvhtn9SZQLW09o76EEpOsxFmh4e1TpcQLtPZt2klL7MQjxybbfL/MSeBwl12eH N3wdZvl+/6IWndgMNjsQWpDVde6vEIBfjOa+FgzquqB3d8XzVqIkJuBbVVfEEuB0BkyJ ALG+WCXKN1VFWLvB4YkKIMD0mNSYsaXf334koing4B8bCT6gaBm4q+rL+R5r5zmOCNyQ /LQhWgCoLvxDrZ5AwhnzYuYQcsgTdQwMw3fROsvgxwxaqPCoLbCJWrmblVFLFmsZ3bEI ZXiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716401912; x=1717006712; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZT2k1mjt88hgM4p0Kqt81UIXI9P2Situq/q5i6oJluk=; b=LpBWjCf85KcwBvt5snYFT8JIIKL9cW498FvKMQ7IWF6ESNiXsHFt4A6e+NNWCerUOa oJWPx3YZX8IRTGXX9zH93Md4sfbvJrIa4QY64WGFQYkO+n7dXiBjkUW9lcW2KYl8QdHT 0ZHX2CQH5tY2Dr9sOfFcRHsL7aKKCbQj/Aj5dW21pdw8N0MQRlO59gBrSKRb+E5tWsZ6 yWlL08UruGAd59QQYZqeRWjIG5KkbSP1mNNrOH9furEC3OTFR0Wi6we1ERJfRZuF2G0u imHt0UJ6CXBwtyFPa+0plc289AYgKbVhBwPe//7ALb2FwRKu7sed0DuzR5l6+5izLk/n /c/Q== X-Gm-Message-State: AOJu0YyPfghD7FwoSLZ+7e7G7Ig1ONoU+eIF/fP4QN6L5F7dUVPgU/aU XuCvuCtDlslkfvcTngZvqTVmhvq92TNZjcslrCgLwuNPqsyTGYaPIett13+84zetqcYb56q27S7 fck/Qr1mGVrc2bBuXiLM5WALWPmlB5ptH X-Google-Smtp-Source: AGHT+IE2rndercjuyRO8VTt6u6NZtO2d+llbu8Ib1KnDBgX7NftllnBLn5qc7o/lpZqHlxY1zjyVKn0JPUt0KzkpuSA= X-Received: by 2002:a05:6102:3e83:b0:47e:f54c:4ba6 with SMTP id ada2fe7eead31-4890a2af00cmr2889070137.27.1716401910844; Wed, 22 May 2024 11:18:30 -0700 (PDT) In-Reply-To: <26189.54659.295857.993689@woitok.gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::e2e; envelope-from=prouleau001@gmail.com; helo=mail-vs1-xe2e.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146796 Archived-At: The function you are looking for is `format-time-string'. Get help on it with ``C-h f format-time-string`` Use ielm (the Elisp shell) to experiment while the help is shown inside another buffer. *** Welcome to IELM *** Type (describe-mode) or press C-h m for help. ELISP> (format-time-string "%Y-%m-%d") "2024-05-22" ELISP> (format-time-string "%Y-%m-%dT%H:%M:%S") "2024-05-22T14:15:11" ELISP> Hope this helps On Wed, May 22, 2024 at 7:23=E2=80=AFAM Dr Rainer Woitok wrote: > Greetings, > > after having unsuccessfully used "C-h a" to find a command returning the > current date and time (preferably as "YYYY-MM-DDThh:mm:ss") I'm now ask- > ing the combined wisdom of this list: is there such a thing? > > Sincerely, > Rainer > > --=20 /Pierre