Ary Junior wrote:
public String test(com.sun.star.beans.XPropertySet xOptions, double
date) {
try {
Date d = (Date)xOptions.getPropertyValue("NullDate");
return "The 'nullDate' is: "+d.Year+"-"+d.Month+"-"+d.Day+",
and the value is:"+String.valueOf(date);
} catch (Exception e) {
return "error";
}
}
You shouldn't cast from something that is specified as "any". Use
AnyConverter instead. Casting isn't guaranteed to work (see
http://udk.openoffice.org/servlets/ReadMsg?list=dev&msgId=545050).
If I pass the a cell formated with the date "1979-07-13" to the "date"
argument of the function, i get the string:
"The 'nullDate' is: 1899-12-30, and the value is: 29049.0"
So you've got everything you need. Use Java's Calendar class, for
example, to make a date from the day, month and year, and add 29049 days.
Niklas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]