Re: Help: using DBTIME to load different time formats
Posted in 1998
In article <3624B6BF.37FCD816@sportingnews.com>,
David Buttrick <buttrick@sportingnews.com> wrote:
> I am running Informix SE 7.24UC5 on Linux...
>
> I have a time stamp in a load file which looks like this:
> 07:30:00PM
>
> Currently, we alter this using perl to represent a correct timestamp.
> I'd like to set the DBTIME environment to load this time stamp format.
>
> Here is what I'm doing currently:
>
> Setting the DBTIME env this way:
>
> DBTIME=%I:%M:%S%p; export DBTIME
>
> Given a schema:
>
> create table stamps
> (
> thing datetime hour to second
> )>
> and this data:
>
> 09:22:54AM|
> 12:20:00PM|
>
> write these to a file things.load
> and use this dbload file:
> --------------------------------------
> file things.load DELIMITER '|' 1;
> insert into stamps;>
> --------------------------------------
>
> I still get an error about illegal characters in datetime string.
>
> According to Informix, this should work.
>
DBTIME environment variable is intended to use with SQL API only.
E.g. in functions dtcvfmtasc(), dttofmtasc() in ESQL/C.
It will not work with dbload or load.
> --
> David Buttrick http://www.sportingnews.com
> WEB Database Specialist
> The Sporting News buttrick@sportingnews.com
> S E E A D I F F E R E N T G A M E
>
--
Vardan Aroustamian
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own