Skip to main content



      Home
Home » Archived » BIRT » MySQL TIME field and BIRT
MySQL TIME field and BIRT [message #211568] Mon, 15 January 2007 09:31 Go to next message
Eclipse UserFriend
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 #211942 is a reply to message #211568] Tue, 16 January 2007 21:05 Go to previous messageGo to next message
Eclipse UserFriend
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.

--
Gary Xue [Actuate Corporation | BIRT Committer]


"Michele" <m_mor@mail15.com> wrote in message
news:eog38p$k4c$1@utils.eclipse.org...
> 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 Go to previous message
Eclipse UserFriend
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

--
Previous Topic:style from theme applies to pdf/design, but not to html
Next Topic:PDF / embedded Truetype fonts on Solaris
Goto Forum:
  


Current Time: Sun Jul 13 11:03:27 EDT 2025

Powered by FUDForum. Page generated in 0.37795 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top