Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

BASIC+Calc | How to separate day, month and year from the result of date calculation

From the code

oCell = ThisComponent.CurrentController.ActiveSheet.GetCellByPosition(0, 1)
.
.
oCell.Value = DateSerial(2019, 10, 25)
oCell = ThisComponent.CurrentController.ActiveSheet.GetCellByPosition(0, 2)
oCell.Formula = "=A2+45"

image description

How can I get day, month and year from cell A2 separately in Integer or String ?