comp.lang.ada
 help / color / mirror / Atom feed
From: "Marc A. Criley" <mcqada95@earthlink.net>
Subject: Re: Timestamps in Ada
Date: Tue, 12 Mar 2002 12:34:01 GMT
Date: 2002-03-12T12:34:01+00:00	[thread overview]
Message-ID: <3C8DE8B0.51FA1AE8@earthlink.net> (raw)
In-Reply-To: a6kr2c$f8k63$1@ID-107015.news.dfncis.de

"A.I" wrote:
> 
> Hi, I want a server program to write logfiles with timestamping, something
> like:
> 
> ...
> [11/03/2002 13:04:15] Connection from 127.0.0.0
> ...
> 
> how can I get the Date and Time in Ada? and conversion to string?

Use the Clock function in the standard Calendar package to get the time
(which comprises both date and time), and if you're using GNAT, you can
use the GNAT.Calendar.Time_IO function to convert it into the desired
string representation.

There are some other "time conversion" utilities available that others
here will likely mention.

Marc A. Criley
Consultant
Quadrus Corporation
www.quadruscorp.com



  reply	other threads:[~2002-03-12 12:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-12 12:07 Timestamps in Ada A.I
2002-03-12 12:34 ` Marc A. Criley [this message]
2002-03-12 12:48   ` Peter Hermann
2002-03-12 13:21     ` Nazgul
2002-03-12 16:44       ` Jeffrey Carter
2002-03-14 15:42   ` Alfred Hilscher
2002-03-12 14:40 ` Georg Bauhaus
2002-03-12 18:15   ` Ada docs, was " tmoran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox