help: datetime feilds are always truncating the time to 00:00 [message #140432] |
Tue, 07 March 2006 05:36  |
Eclipse User |
|
|
|
If I do something like this:
select sysdate as mydate from dual
in toad, it returns:
07/03/2006 11:23:05
If I then take this row and drop it into a report item (row["mydate"], it
shows
7-Mar-2006 00:00
In the data set, Im seting the type to
If I use the Property Editor to edit the data, and change the "format
dateTime" to say "07 March 2006 11:26:11 CET", then preview the report, it
shows:
07 March 2006 00:00 CET.
Im having the same problem going the other way, if my sql is something like:
select
created
from
myrecord
where
created between ? and ?
then pass in a 2 parameters which are formattted (using the custom format
string) to something like 07/03/06 01:01:01 and 07/03/06 23:59:59 I get no
rows back, but If I change it to 07/03/06 01:01:01 and 08/03/06 23:59:59 I
just get the rows back for the day of the 7th. I have tried lots of formats,
including the default ones.
So the time is getting truncated in input also.
Any ideas?
Birt.
|
|
|
Re: datetime feilds are always truncating the time to 00:00 [message #140455 is a reply to message #140432] |
Tue, 07 March 2006 05:44   |
Eclipse User |
|
|
|
Interestingly, in the "output columns" of the dataset, it shows the type as
"Date".
There seems to be no way to change this. I dont know if this is a java
scirpt Data object, a Java Date object or a birt Date object.
I have no filters, no aliases, no computed columns.
When I do "preview results" in the data set editor, it shows 00:00 for all
dates, even though I know tha these dates have proper times.
"birt" <birt@ohds.co.uk> wrote in message news:dujno8$12c$1@eclipse.org...
> If I do something like this:
>
> select sysdate as mydate from dual
>
> in toad, it returns:
>
> 07/03/2006 11:23:05
>
> If I then take this row and drop it into a report item (row["mydate"], it
> shows
>
> 7-Mar-2006 00:00
>
> In the data set, Im seting the type to
>
> If I use the Property Editor to edit the data, and change the "format
> dateTime" to say "07 March 2006 11:26:11 CET", then preview the report, it
> shows:
>
> 07 March 2006 00:00 CET.
>
> Im having the same problem going the other way, if my sql is something
> like:
>
> select
> created
> from
> myrecord
> where
> created between ? and ?
>
> then pass in a 2 parameters which are formattted (using the custom format
> string) to something like 07/03/06 01:01:01 and 07/03/06 23:59:59 I get no
> rows back, but If I change it to 07/03/06 01:01:01 and 08/03/06 23:59:59 I
> just get the rows back for the day of the 7th. I have tried lots of
> formats, including the default ones.
>
> So the time is getting truncated in input also.
>
> Any ideas?
>
> Birt.
>
>
>
>
>
>
|
|
|
Re: datetime feilds are always truncating the time to 00:00 [message #140509 is a reply to message #140432] |
Tue, 07 March 2006 06:38   |
Eclipse User |
|
|
|
I am using trial and error to get a datetime into a report. E.g. using
something like the following:
select to_char(sysdate, 'DD/MM/YY HH24:MI:SS') as mydate from dual
When I do this, the dataa set preview shows the right date and time, ( I
guess its not doing anything with date objects), but in my report the
date/time string comes out blank.
Ive tried lots of formats, but as Birt hangs for nearly 10 minutes each time
I open the data set for editing, this is a long and tedious process which
will take days (and cost thousands of pounds).
Has anyone manged to get a date & time (including seconds) out of oracle
into a report?
What format is it expecting from the DB?
Is noone out there using brit for datetimes?
Birt.
"birt" <birt@ohds.co.uk> wrote in message news:dujno8$12c$1@eclipse.org...
> If I do something like this:
>
> select sysdate as mydate from dual
>
> in toad, it returns:
>
> 07/03/2006 11:23:05
>
> If I then take this row and drop it into a report item (row["mydate"], it
> shows
>
> 7-Mar-2006 00:00
>
> In the data set, Im seting the type to
>
> If I use the Property Editor to edit the data, and change the "format
> dateTime" to say "07 March 2006 11:26:11 CET", then preview the report, it
> shows:
>
> 07 March 2006 00:00 CET.
>
> Im having the same problem going the other way, if my sql is something
> like:
>
> select
> created
> from
> myrecord
> where
> created between ? and ?
>
> then pass in a 2 parameters which are formattted (using the custom format
> string) to something like 07/03/06 01:01:01 and 07/03/06 23:59:59 I get no
> rows back, but If I change it to 07/03/06 01:01:01 and 08/03/06 23:59:59 I
> just get the rows back for the day of the 7th. I have tried lots of
> formats, including the default ones.
>
> So the time is getting truncated in input also.
>
> Any ideas?
>
> Birt.
>
>
>
>
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.02722 seconds