[dba-issues] [Issue 84918] Setting the boundfield.val ue of a date field is wrong

2008-09-18 Thread fs
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=84918


User fs changed the following:

What|Old value |New value

  Status|RESOLVED  |CLOSED





--- Additional comments from [EMAIL PROTECTED] Thu Sep 18 12:26:51 + 
2008 ---
closing

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dba-issues] [Issue 84918] Setting the boundfield.val ue of a date field is wrong

2008-09-18 Thread fs
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=84918


User fs changed the following:

What|Old value |New value

  Status|NEW   |RESOLVED

  Resolution|  |INVALID





--- Additional comments from [EMAIL PROTECTED] Thu Sep 18 12:26:15 + 
2008 ---
sorry, this is INVALID

Citing the help for the DateSerial function:
  The DateSerial function returns the number of days between December 30,1899
  and the given date.

Now what is written into the BoundField of the column is actually a mere number,
say 39709 (this would be the value for 18.09.2008). The implementation of the
bound field does not have any chance to recognize that the value has been
converted from a date *relative to 30.12.1899*. That is, it *can* recognize that
the value must be converted to a date value (simply because the underlying
database column requires a date value), but it does so using the standard SQL
"Null Date", and this isn't 1899-12-30, but 1900-01-01.

So, the numerical value passed to the bound field is interpreted relative to the
standard SQL Null Date, which differs by two days from the Null Date used by the
DateSerial function, which explains the difference you observed.

So, finally, this is a bug in the macro, as it uses an inappropriate data type
for passing values.

Possible solutions how to correct the macro include:
- Since the Null Date of DateSerial and the Null Date for database operations
  are well-defined, and known to differ by two days, just subtract those 2
  days from the return value of the DaySerial function.
- create a more appropriate data structure for passing the date. For
  instance, "Dim" a value as "new com.sun.star.util.Date", fill it, and
  write it into the BoundField.

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dba-issues] [Issue 84918] Setting the boundfield.val ue of a date field is wrong

2008-01-02 Thread fs
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=84918





--- Additional comments from [EMAIL PROTECTED] Wed Jan  2 21:21:55 + 
2008 ---
fs->kirschbaum: msc did all this for you.

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dba-issues] [Issue 84918] Setting the boundfield.val ue of a date field is wrong

2008-01-02 Thread kirschbaum
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=84918





--- Additional comments from [EMAIL PROTECTED] Wed Jan  2 20:43:09 + 
2008 ---
Hi msc, what have I to do? How can I confirm, how can I set a target and who is
the right developer?

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dba-issues] [Issue 84918] Setting the boundfield.val ue of a date field is wrong

2008-01-02 Thread msc
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=84918


User msc changed the following:

What|Old value |New value

 Assigned to|dbaneedsconfirm   |fs

  Ever confirmed|  |1

  Status|UNCONFIRMED   |NEW

Target milestone|---   |OOo 3.x





--- Additional comments from [EMAIL PROTECTED] Wed Jan  2 11:30:42 + 
2008 ---
confirm, set target and send to the right developer

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dba-issues] [Issue 84918] Setting the boundfield.val ue of a date field is wrong

2007-12-30 Thread kirschbaum
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=84918





--- Additional comments from [EMAIL PROTECTED] Sun Dec 30 19:04:50 + 
2007 ---
Open attached data base Date-issue
Open form dateform
Set any date into the date field
Select Extras/Makros/Makros verwalten/Makro
Execute dateform/Standard/Module1/Main
Check the date field in the form: It will be "22.12.50" instead of "20.12.50".


-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dba-issues] [Issue 84918] Setting the boundfield.val ue of a date field is wrong

2007-12-30 Thread kirschbaum
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=84918





--- Additional comments from [EMAIL PROTECTED] Sun Dec 30 18:57:10 + 
2007 ---
Created an attachment (id=50605)
Database with date issue


-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dba-issues] [Issue 84918] Setting the boundfield.val ue of a date field is wrong

2007-12-30 Thread kirschbaum
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=84918
 Issue #|84918
 Summary|Setting the boundfield.value of a date field is wrong
   Component|Database access
 Version|OOo 2.3
Platform|PC
 URL|
  OS/Version|Windows XP
  Status|UNCONFIRMED
   Status whiteboard|
Keywords|
  Resolution|
  Issue type|DEFECT
Priority|P3
Subcomponent|none
 Assigned to|dbaneedsconfirm
 Reported by|kirschbaum





--- Additional comments from [EMAIL PROTECTED] Sun Dec 30 18:51:25 + 
2007 ---
The following macro does not work properly:

Sub Main

  dim oDoc as object
  dim oForm as object
  dim oDate as object
  dim sDate as string
  dim iDate as integer
  oDoc = ThisComponent
  oForm = oDoc.DrawPage.Forms.GetByIndex(0)
  oDate = oForm.getByName("datdate")
  sDate = "20.12.1950"
  iDate = DateSerial(mid(sDate,7),mid(sDate,4,2),left(sDate,2))
  oDate.BoundField.Value = iDate 

End Sub
*
datdate is a date field in a form based on a table with the field date. The
macro sets the field "datdate" to the value "22.12.1950" instead of
"20.12.1950". If I change the last line to
"oDate.BoundField.Value = iDate - 2"
then the field is set to the right value.
I would like to attach an example database, but I don't know how.

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]