To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=61730 Issue #:|61730 Summary:|Formating a date Component:|Spreadsheet Version:|OOo 2.0 Platform:|PC URL:| OS/Version:|Windows 2000 Status:|UNCONFIRMED Status whiteboard:| Keywords:| Resolution:| Issue type:|ENHANCEMENT Priority:|P3 Subcomponent:|programming Assigned to:|spreadsheet Reported by:|ymaingoy
------- Additional comments from [EMAIL PROTECTED] Tue Feb 7 02:29:51 -0800 2006 ------- Hi, I have a problem with the user (non standard) format of dates. Create a new sheet, set the format of the Cell B1 like this : "JJ/MM/AAAA HH:MM" (in french, or "DD/MM/YYYY HH:MM" for internationals users) Enter this in the cell : 15/10/2006 and OOo reconize this date exactly as July 2006 the 15th. But... Create a new module for this clac document, and enter this code : REM ***** BASIC ***** Public sub Main Dim oDoc As Object Dim oSheet As Object Dim oCell As Object oDoc = ThisComponent oSheet = oDoc.Sheets(oDoc.CurrentSelection.CellAddress.Sheet) 'Note: The cell B1 is in date format "JJ/MM/AAAA HH:MM:SS" oCell = oSheet.getCellByPosition(1, 1) oCell.Formula = "05/10/2006 23:59" 'reconize this date : "10/05/2006 23:59" (wrong for my settings) oCell = oSheet.getCellByPosition(1, 1) oCell.Formula = "15/10/2006 23:59" ' does not reconize the date and give a string: "'15/10/2006 23:59" End Sub The basic instruction ".Formula" does not compute the date by the same algorythm than Calc ! 1) Is there a method to force the ".Formula" to accept a date with the cell format ? (code enhancement ?) 2) I can't find a documentation of defaults formats accepted by the ".Formula". (documentation enhancement ?) 3) If your reponse is like : the .Formula only understand this date format "MM/DD/YYYY ..." by default, I want to be certain that this will be fixed and never changed in future (yes, no body knows, but..). Thanks a lot, Yves Maingoy France --------------------------------------------------------------------- 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]