Hi ,
we are migrating data to an ingres database.
The data is in a flat file(text file, one record per line) with the vaues.
The text file is generated uing java program, while creating the flat file
we need to change the data format as recognised by ingres.
we are facing problem to convert date format in java to the format
recognized by ingres.
Ingres stores date format like "3239.83".
Any suggestions?
Regards,
Puneet
On Web - 14 Aug 2007 16:49 GMT
Puneet,
Ingres doesn't have dates like that. Where did you get that idea?
Paul
>Hi ,
>we are migrating data to an ingres database.
>The data is in a flat file(text file, one record per line) with the vaues.
>The text file is generated uing java program, while creating the flat file
>we need to change the data format as recognised by ingres.
>we are facing problem to convert date format in java to the format
>recognized by ingres.
>Ingres stores date format like "3239.83".
>Any suggestions?
>Regards,
>Puneet
Mike Lay (News) - 15 Aug 2007 19:02 GMT
> Hi ,
>
[quoted text clipped - 11 lines]
>
> Any suggestions?
abcde.fgh looks more like the sort of thing you get when you ask a
TDateTime (Delphi/C++Builder) or a c time (or whatever the Java
equivalent is) for a date. It supplies it as an offset from some
previous point.
INGRES stores and reads dates as dates. Type
select date('now');\g
into the sql monitor and you'll get an example.
--
Mike Lay
email: newstrap @ Rees<secondpartname>.+.com (replace obvious symbols;-)
andre.laframboise@lac-bac.gc.ca - 15 Aug 2007 19:28 GMT
If I remember correctly, Ingres internaly stores the date in a non-human
format (12 bytes?).
It displays the date according to the II_DATA_FORMAT ingres variable.
Ingres is quite flexible when it comes to accepting different formats.
Andre
-----Original Message-----
From: info-ingres-bounces@kettleriverconsulting.com
[mailto:info-ingres-bounces@kettleriverconsulting.com] On Behalf Of Mike Lay
(News)
Sent: Wednesday, August 15, 2007 2:02 PM
To: info-ingres@kettleriverconsulting.com
Subject: Re: [Info-Ingres] Need Some Info
> Hi ,
>
[quoted text clipped - 11 lines]
>
> Any suggestions?
abcde.fgh looks more like the sort of thing you get when you ask a TDateTime
(Delphi/C++Builder) or a c time (or whatever the Java equivalent is) for a
date. It supplies it as an offset from some previous point.
INGRES stores and reads dates as dates. Type
select date('now');\g
into the sql monitor and you'll get an example.
--
Mike Lay
email: newstrap @ Rees<secondpartname>.+.com (replace obvious symbols;-)
_______________________________________________
Info-Ingres mailing list
Info-Ingres@kettleriverconsulting.com
http://www.kettleriverconsulting.com/mailman/listinfo/info-ingres