The easiest way to write a "date value" into a cell is:

- Code: Select all Expand viewCollapse view
`oCell.FormulaLocal = "2013-10-11"`

which is just a sophisticated way to put value 41558.

Any cell has a string, a value and a formula at the same time. The formula is translated to a local formula which is shown in the status bar. The ISO-date is the one and only local formula string that is recognized unambiguously and independent from local idieosynchracies. No matter which of the 150 locale setting is the currently avtive one, 2013-10-11 entered into the formula bar will always put today's date into a cell, unless it had been formatted as string before the entry.

oCell.getFormula returns the correct string of the un-localized formula, which is "41558".

oCell.getString is completely meaningless. It returns the one formatting variant among thousands of possible formattings for the the number 41558.

oCell.getValue will now return the correct value 41558.

=A1=41558 will return TRUE if the macro wrote to A1 and the NullDate setting is 1899-12-30. This method will put the right date with any other NullDate setting as well.

Similar with a date control. getDate gets/sets the true value as an ISO date YYYYMMDD (integer number with 8 digits). for a programmer the displayed string is completely meaningless.