Issue 99566 - Loose format of datetme field after aggregate function
Summary: Loose format of datetme field after aggregate function
Status: CLOSED FIXED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 3.0.1
Hardware: PC Windows Server 2003
: P3 Trivial (vote)
Target Milestone: OOo 3.3
Assignee: marc.neumann
QA Contact: issues@dba
URL:
Keywords: needhelp, oooqa
Depends on:
Blocks:
 
Reported: 2009-02-24 08:44 UTC by sstefanov
Modified: 2017-05-20 10:23 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Bug document with example queries (6.60 KB, application/vnd.sun.xml.base)
2009-09-29 19:57 UTC, drewjensen.inbox
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description sstefanov 2009-02-24 08:44:39 UTC
Version of Base is OOO300m15 (I didn't find in list menu).
Platform is Windows 2003 server, ODBC connection to SQL Server 2000.
The problem:
I have datetime field in SQL table. When I greate query in Base with aggregate
function I receive field formatted as number, not as datetime.

Example:
Table is
CREATE TABLE [dbo].[TestDateTime] (
  [DOCUMENTID] int NULL,
  [CREATED_DATE] datetime NULL
)

SQL is:

SELECT
 DOCUMENTID,
 MIN(CREATED_DATE)
GROUP BY
 DOCUMENTID

Function CAST also is not working:

SELECT
 DOCUMENTID,
 CAST(MIN(CREATED_DATE) AS DATETIME)
GROUP BY
 DOCUMENTID
Comment 1 sstefanov 2009-02-24 08:54:01 UTC
When I did same thing using ADO connection all seems to be OK!
Comment 2 Mechtilde 2009-06-21 20:55:37 UTC
I don't have a MS SQl Server to test it.

Comment 3 drewjensen.inbox 2009-09-29 19:56:58 UTC
Checked w/ DEV300m_60, XP and using embedded HSQLdb database.

To reproduce:

Open the attached bug document.
The file contains two queries:
Max_DateTime_EscapeProcessing_enabled
Max_DateTime_EscapeProcessing_disabled

Execute both queries by double clicking them from the main window UI.
Notice that both dataview windows display the column MaxDate as an integer.
Close both dataview windows.
Open the query "Max_DateTime_EscapeProcessing_disabled" in Edit SQL View mode
and execute the query from the query designer - the column is returned as a Date.

The same holds for DateTime fields.

Confirming, assigning to developer, setting initial target
Comment 4 drewjensen.inbox 2009-09-29 19:57:45 UTC
Created attachment 65044 [details]
Bug document with example queries
Comment 5 ocke.janssen 2009-11-12 08:35:44 UTC
Fixed in cws dba33b
Comment 6 ocke.janssen 2009-12-14 12:48:21 UTC
Please verify in cws dba33b. Thanks.
Comment 7 marc.neumann 2010-01-08 08:28:38 UTC
verified in CWS dba33b

find more information about this CWS, like when it is available in the master
builds, in EIS, the Environment Information System:
http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300%2Fdba33b