From owner-freebsd-questions Tue Oct 26 19:46:12 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mail.westbend.net (ns1.westbend.net [209.224.254.131]) by hub.freebsd.org (Postfix) with ESMTP id 65BC51528D for ; Tue, 26 Oct 1999 19:46:05 -0700 (PDT) (envelope-from hetzels@westbend.net) Received: from admin (admin.westbend.net [209.224.254.141]) by mail.westbend.net (8.9.3/8.9.3) with SMTP id KAA07935 for ; Mon, 5 Jan 1998 10:13:09 -0600 (CST) (envelope-from hetzels@westbend.net) Message-ID: <000a01bf2025$69fe1040$8dfee0d1@westbend.net> From: "Scot W. Hetzel" To: Subject: Date -f fmt date - how to get it to work Date: Tue, 26 Oct 1999 21:46:04 -0500 Organization: West Bend Internet MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6000 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I am trying to add a hour to a date value in the format of "YYYYmmddHHMM.SS", but when I execute the date command it returns an illegal time format: # date -v+1H -f '%Y%m%d%H%M.%S' 199901051000.03 +%Y%m%d%H%M.%S Failed conversion of ``199901051000.03'' using format ``%Y%m%d%H%M.%S'' date: illegal time format If I break-up the date into YYYY/mm/dd HH/MM/SS, then it will work. # date -v+1H -f '%Y/%m/%d %H:%M:%S' '1999/01/05 10:00:03' +%Y%m%d%H%M.%S 199901051100.03 What do I have to change to get the first date command to work? Thanks, Scot P.S. Please CC me on any replies. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message