From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: tpeplt Newsgroups: gmane.emacs.help Subject: Re: Get current date and time as a string? Date: Wed, 22 May 2024 12:27:27 -0400 Message-ID: <874japyfps.fsf@gmail.com> References: <26189.54659.295857.993689@woitok.gmail.com> <86o78yjd7q.fsf@fastmail.fm> 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="29957"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) 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 18:28:18 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 1s9op8-0007Rl-9F for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 22 May 2024 18:28:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9ooZ-000442-1w; Wed, 22 May 2024 12:27:43 -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 1s9ooR-00043P-Nl for Help-Gnu-Emacs@gnu.org; Wed, 22 May 2024 12:27:36 -0400 Original-Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s9ooM-0008Tv-6N for Help-Gnu-Emacs@gnu.org; Wed, 22 May 2024 12:27:33 -0400 Original-Received: by mail-qt1-x835.google.com with SMTP id d75a77b69052e-43dfcbc4893so27639581cf.2 for ; Wed, 22 May 2024 09:27:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716395248; x=1717000048; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sNdWovyKKzqLsnhAui+EkFzmCH9eh9AxpIUTofUNZ4k=; b=YB0sLPrUvzWvkWB3Rhr7ZI5jJFEcNU5tp+IDYAbpso0bXTbhwNwHzdfeT0FBQOyhEA 0wYndcZk4Z1SxPA4wOMz5LFSAi46HNgU4eCojDmAD1ll0dqBIE1JLm7GmvYv45jC3a1I u6k10pZzK+tDlMNBtoxlSmWwNoaP2CLF+gLYMv5UAzpKsX4ohVmZlaP6LNeHNpb+ZvyZ /6QgOYXaPTcbXF1llsyZ0ZYPosh5iYtD15tV2NOS/d1vFjM55AbtuzO1e93ywr4z3yTF w4MZVr5c+RmIxZ7BT8V/j3kXajTaBsT2DqkpynOgxiHtworubo2scdjCxhEM1RyNm21U 7Z3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716395248; x=1717000048; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=sNdWovyKKzqLsnhAui+EkFzmCH9eh9AxpIUTofUNZ4k=; b=KwjMVXDVc8KZzDye6cKqOeOU9+DEdBghWHpDdgU1Fp0R3qXwcYGOSNhrNWi3Nfv9Gp qztNwxBZsF01M5HEp2tVtZ5x1J+dma/epw3OcJRBTmKEDYtjmXkQ54OdW1/mYaFFGNXD rJ4Qfq833dJSkJJ817txiYavKX3Qc/1qdLOTHxp/HehIHrhjOMFfiTi7B2BX0ONDRJt7 Wy5kamT/+SZ3VlBXrlBDoQBq2mTwsfs001/W+dgeSViezfk41FKv0YZaGXRHJiWTvGtq 1SmUOLItSVkfLcnTfboUcLNWMoKPolyZCsR+Kd2Y5rFwdX1h2aUO429OxZYURUeIfIni ibyA== X-Gm-Message-State: AOJu0YwBgJ8SwWgGNvXx7VX6DOpEjkVQKStcSG0Xn/SUw6WWgdnT79cL C1LM3Td2J1pLgceb+gLHWcwmwEqW/tOTMSYUrFXAOhBRysl4+HDvd8w2xQ== X-Google-Smtp-Source: AGHT+IHYnxsqWXBp1CPMj2K0FH4+1iDSne1rklfLftsWgSMp4TGp6XwqlhvoC5zFML4DJWFkDAtXnA== X-Received: by 2002:ac8:5fcf:0:b0:43c:56d8:90d1 with SMTP id d75a77b69052e-43f9e0e154amr25650911cf.37.1716395248664; Wed, 22 May 2024 09:27:28 -0700 (PDT) Original-Received: from t530.local ([2600:8806:a801:3150:7329:d24d:52b3:6da6]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-43e046467a4sm157255921cf.83.2024.05.22.09.27.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 09:27:28 -0700 (PDT) In-Reply-To: <86o78yjd7q.fsf@fastmail.fm> (Joost Kremers's message of "Wed, 22 May 2024 13:30:33 +0200") Received-SPF: pass client-ip=2607:f8b0:4864:20::835; envelope-from=tpeplt@gmail.com; helo=mail-qt1-x835.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=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-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:146795 Archived-At: >> On Wed, May 22 2024, 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? > > You'll want a combination of `current-time` and `format-time-string`. See= (info > "(elisp) Time of Day") and (info "(elisp) Time Parsing"), respectively. > Also, for future reference, try "C-h a" and enter "apropos" at the prompt. This will show the many other forms of looking up appropriate information, including =E2=80=98apropos-function=E2=80=99. So, instead of = looking up commands (interactive functions), look up functions (commands, functions, macros) related to time: M-x apropos-function Search for function (word list or regexp): time RET And since it accepts regular expressions, you can narrow this search to eliminate names that include, for example, "timer": Search for function (word list or regexp): -time$\|^time-\|-time- --=20 The lyf so short, the craft so long to lerne. - Geoffrey Chaucer, The Parliament of Birds.