From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e686c2c95beefb1c X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews2.google.com!not-for-mail From: 402450@cepsz.unizar.es (Jano) Newsgroups: comp.lang.ada Subject: Re: Inserting Calendar.Time in a database Date: 8 Aug 2004 04:10:38 -0700 Organization: http://groups.google.com Message-ID: <5d6fdb61.0408080310.4ef905ba@posting.google.com> References: NNTP-Posting-Host: 62.101.164.138 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1091963439 10607 127.0.0.1 (8 Aug 2004 11:10:39 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 8 Aug 2004 11:10:39 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:2625 Date: 2004-08-08T04:10:38-07:00 List-Id: Duncan Sands wrote in message news:... > If you are using GNAT, have a look at GNAT.Calendar > and GNAT.Calendar.Time_IO. Pardon me as I see I've not exposed some of my requirements. The timestamp column is used in other SQL queries, and that column to be indexed is extremely interesting. Because of that, I can't afford to transform a string representation or 'seconds-after-epoch' since the index is lost. My database doesn't allow neither to index a view, so that's why the trigger solution is for now the more appealing. Unless, of course, there is a way to insert timestamps with Gnade. I suppose that if I use the thin binding, knowing the internal representation of a sql timestamp as required by the ODBC interface would be enough.