MySQL TIME field and BIRT [message #211568] |
Mon, 15 January 2007 09:31  |
Eclipse User |
|
|
|
Originally posted by: m_mor.mail15.com
Hi.
I am using MySQL 5.0.27, Birt 2.1.1 and the MySQL connector 5.0.4.
I have created a view in MySQL which contain a field called `duration`.
This field is set as TIME (HH:MM:SS).
When I create a dataset using BIRT, every other field is fine, this one
is set as DATE (don't know how to change it) and it displays the data
in the wrong format.
For example, if in my view I have '00:30:00', BIRT displays '1 Jan 1970
00:30'
What should I change in order to get BIRT displays the correct time?
Thanks,
Michele
--
|
|
|
|
Re: MySQL TIME field and BIRT [message #213243 is a reply to message #211942] |
Tue, 23 January 2007 05:22  |
Eclipse User |
|
|
|
Originally posted by: m_mor.mail15.com
Gary Xue wrote:
> You can apply Date/time format rule in the Data item that displays
> the Date value to show only the time portion.
>
> BIRT does not yet support the TIME data type. TIME fields are
> converted to DATE, with a fixed date (1 Jan 1970) added. That's why
> you always see a complete date/time value in the data set preview.
Hi. I decided to convert the data from TIME to STRING directly into the
view.
See syntax below:
time_format(sec_to_time(sum(time_to_sec(`time_sum`.`Duration `))),'%H:%i:
%s') AS `Duration`
This solved the problem.
Thanks.
Michele
--
|
|
|
Powered by
FUDForum. Page generated in 0.37795 seconds