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: 18 Aug 2004 21:10:19 -0700 Organization: http://groups.google.com Message-ID: <5d6fdb61.0408182010.23696147@posting.google.com> References: <1jgik0ntrex36$.1pyha1husddpe.dlg@40tude.net> <41134e18$1_1@baen1673807.greenlnk.net> <94tir0ejn3n4$.a7o1lv87loha$.dlg@40tude.net> <13x45njobjvn3.yhisk87dws3.dlg@40tude.net> <1j730n9o2lgav$.rvhdl0zjqvnw$.dlg@40tude.net> NNTP-Posting-Host: 62.101.164.138 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1092888619 4501 127.0.0.1 (19 Aug 2004 04:10:19 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 19 Aug 2004 04:10:19 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:2833 Date: 2004-08-18T21:10:19-07:00 List-Id: "John B. Matthews" wrote in message news:... > Does the OP's database support conversion with a format mask? > For example, assuming a fuction that converts a Time to a > formatted String, tell the database what format to use: > > DT_String := To_String(Clock); > ... > insert into values > (..., TO_DATE(:DT_String,'YYYY-MM-DD hh:mi:ss'), ...); Thanks for this suggestion, I hadn't thought of it but is probably doable (I'm using Firebird and planning to migrate to Postgresql as soon as the new windows release gets out of beta, and the later for sure have this conversion masks). > I understand this is non-portable. Enough for my needs. Amazing how sometimes the simplest solutions can ellude someone... Thanks!