Skip to main content



      Home
Home » Archived » BIRT » Converting Unix-Timestamp to Date inside BIRT
Converting Unix-Timestamp to Date inside BIRT [message #202937] Sun, 26 November 2006 14:58 Go to next message
Eclipse UserFriend
Originally posted by: birt.matthiasspork.de

Hy,

I get an Unix-Timestamp from a Database as decimal (i.e 1164425523) and
want to display this value in a human readable format like "20.01.2006 -
10:32". How can I (as a newbie) do this?

Kind regards
Matze
Re: Converting Unix-Timestamp to Date inside BIRT [message #202945 is a reply to message #202937] Mon, 27 November 2006 00:52 Go to previous messageGo to next message
Eclipse UserFriend
var d = new Packages.java.util.Date(longValue);

"Matze" <birt@matthiasspork.de> ???? news:ekcrkn$oot$1@utils.eclipse.org...
> Hy,
>
> I get an Unix-Timestamp from a Database as decimal (i.e 1164425523) and
> want to display this value in a human readable format like "20.01.2006 -
> 10:32". How can I (as a newbie) do this?
>
> Kind regards
> Matze
>
Re: Converting Unix-Timestamp to Date inside BIRT [message #202959 is a reply to message #202945] Mon, 27 November 2006 03:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: birt.matthiasspork.de

qbaojian schrieb:
> var d = new Packages.java.util.Date(longValue);

Where must I put this in? Direct in the Report-Field is not working:

new Packages.java.util.Date( dataSetRow["timestamp"] )

Kind regard
Matze
Re: Converting Unix-Timestamp to Date inside BIRT [message #203138 is a reply to message #202959] Mon, 27 November 2006 16:39 Go to previous message
Eclipse UserFriend
Originally posted by: johnw.innoventsolutions.com

Matze,

Put that in the Fetch method. What you may need to do is create another
column in your dataset, and assign that column the value in the fetch
method. Although not necessary, it will give you the illusion off
somewhat working as expected.

You may also create a computed column and output the results of that.
This is done in the data set editor.

Try it both ways, and let us know the results.

John

Matze wrote:
> qbaojian schrieb:
>> var d = new Packages.java.util.Date(longValue);
>
> Where must I put this in? Direct in the Report-Field is not working:
>
> new Packages.java.util.Date( dataSetRow["timestamp"] )
>
> Kind regard
> Matze
Previous Topic:Tomcat Viewer Issue
Next Topic:java.lang.NoSuchMethodError: initStandardObjects
Goto Forum:
  


Current Time: Thu May 29 01:53:59 EDT 2025

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

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

Back to the top