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!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!peer01.cox.net!peer02.cox.net!cox.net!news-server.columbus.rr.com!fe2.columbus.rr.com.POSTED!not-for-mail From: "John B. Matthews" Newsgroups: comp.lang.ada Subject: Re: Inserting Calendar.Time in a database 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> User-Agent: MT-NewsWatcher/3.3b1 (PPC Mac OS X) Message-ID: Date: Wed, 11 Aug 2004 01:14:20 GMT NNTP-Posting-Host: 65.31.62.213 X-Complaints-To: abuse@rr.com X-Trace: fe2.columbus.rr.com 1092186860 65.31.62.213 (Tue, 10 Aug 2004 21:14:20 EDT) NNTP-Posting-Date: Tue, 10 Aug 2004 21:14:20 EDT Organization: Road Runner High Speed Online http://www.rr.com Xref: g2news1.google.com comp.lang.ada:2659 Date: 2004-08-11T01:14:20+00:00 List-Id: In article , "Nick Roberts" wrote: > On Tue, 10 Aug 2004 08:36:44 GMT, John B. Matthews > wrote: > [...] > > 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'), ...); > > > > I understand this is non-portable. > > Couldn't one simply use: > > insert into
values > (..., Current_Timestamp, ...) > ? Indeed, the ODBC driver's function Current_Timestamp would insert the current server-side timestamp. Unfortunately, the server and client may be in different timezones, leading to Dmitry's original observation about political v. universal time. Also, the OP wanted to know the ODBC driver's vendor-specific timestamp literal format. It's often something like {ts 'yyyy-mm-dd hh:mi:ss'} John ---- jmatthews at wright dot edu www dot wright dot edu/~john.matthews/