comp.lang.ada
 help / color / mirror / Atom feed
From: "John B. Matthews" <nospam@nospam.com>
Subject: Re: Inserting Calendar.Time in a database
Date: Wed, 11 Aug 2004 01:14:20 GMT
Date: 2004-08-11T01:14:20+00:00	[thread overview]
Message-ID: <nospam-E804F3.21194610082004@news-server-fe-01.columbus.rr.com> (raw)
In-Reply-To: opsci5bhcgp4pfvb@bram-2

In article <opsci5bhcgp4pfvb@bram-2>,
 "Nick Roberts" <nick.roberts@acm.org> wrote:

> On Tue, 10 Aug 2004 08:36:44 GMT, John B. Matthews <nospam@nospam.com>  
> 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 <table> values
> > (..., TO_DATE(:DT_String,'YYYY-MM-DD hh:mi:ss'), ...);
> >
> > I understand this is non-portable.
> 
> Couldn't one simply use:
> 
>     insert into <table> 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/



  reply	other threads:[~2004-08-11  1:14 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-05 13:44 Inserting Calendar.Time in a database Jano
2004-08-05 15:21 ` Dmitry A. Kazakov
2004-08-05 21:19   ` Martin Dowie
2004-08-06  6:31     ` Jano
2004-08-06 11:32       ` Peter Hermann
2004-08-06 11:40         ` Duncan Sands
2004-08-08 11:10           ` Jano
2004-08-06  7:48     ` Dmitry A. Kazakov
2004-08-06  9:28       ` Martin Dowie
2004-08-06 10:44         ` Dmitry A. Kazakov
2004-08-07  9:50           ` Martin Dowie
2004-08-07 20:32             ` Dmitry A. Kazakov
2004-08-08  8:35               ` Martin Dowie
2004-08-08 11:03                 ` Simon Wright
2004-08-09  7:46                 ` Dmitry A. Kazakov
2004-08-09 17:54                   ` Nick Roberts
2004-08-10  7:33                     ` Dmitry A. Kazakov
2004-08-10  8:36                     ` John B. Matthews
2004-08-10 18:51                       ` Nick Roberts
2004-08-11  1:14                         ` John B. Matthews [this message]
2004-08-19  4:10                         ` Jano
2004-08-19  4:10                       ` Jano
2004-08-09 11:52                 ` Frank J. Lhota
2004-08-08 10:46       ` Simon Wright
2004-08-09  8:02         ` Dmitry A. Kazakov
2004-08-24 19:25       ` Randy Brukardt
2004-08-25  7:24         ` Dmitry A. Kazakov
2004-08-25  8:18           ` Martin Dowie
2004-08-25  9:25             ` Dmitry A. Kazakov
2004-08-25  9:42               ` Martin Dowie
2004-08-26  5:26               ` Simon Wright
2004-08-26  0:49           ` Randy Brukardt
2004-08-26  9:30             ` Dmitry A. Kazakov
2004-08-26 10:11               ` Martin Dowie
2004-08-26 10:58                 ` Dmitry A. Kazakov
2004-08-26 12:32                   ` Martin Dowie
2004-08-26 16:26                     ` Dmitry A. Kazakov
2004-08-26 17:23                       ` Martin Dowie
2004-08-26 18:55               ` Randy Brukardt
2004-08-26 20:04                 ` Dmitry A. Kazakov
2004-08-26  5:22           ` Simon Wright
replies disabled

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