Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320493 - Set date/time format programmatically, StructureFactory implementation
Summary: Set date/time format programmatically, StructureFactory implementation
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Birt-Data-inbox@eclipse.org CLA
QA Contact: mindan xu CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-21 08:25 EDT by Reinhard CLA
Modified: 2011-04-06 16:24 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Reinhard CLA 2010-07-21 08:25:10 EDT
Build Identifier: 20100218-1602

I create a report programmatically and have a date-time column. Data for this column comes in short format, like 22.06.10. 15:06:53 I have to set this column to date-time data type.

I do it this way: computedColumn.setDataType(DesignChoiceConstants.COLUMN_DATA _TYPE_DATETIME);

Now I get a following output: 22.06.0010 15:06:53. The year has 4 digits and first two are 00.

The question is, how can I set the DateTime format. I found a constant for this, DesignChoiceConstants.DATETIEM_FORMAT_TYPE_SHORT_DATE but how to set it and to which component.

Jason Weathersby wrote:
We should have a StructureFactory implementation for this.

Reproducible: Always
Comment 1 Xiaoying Gu CLA 2010-11-18 22:10:48 EST
(In reply to comment #0)
Hi, Reinhard

Could you attach your test report?
Comment 2 Lin Zhu CLA 2011-04-06 16:24:56 EDT
Hey Reinhard,

Can you try to use a data time value which follow ISO8601 standard? The property DesignChoiceConstants.DATETIEM_FORMAT_TYPE_SHORT_DATE is not used for parsing the Date value. It is only for formatting.

Thanks.
Lin