Meow
About time functions. I remember in Word Basic from MS Word 6, function Second returns seconds and 100 miliseconds and 10 miliseconds. Something about this example: "3,14". Seconds of corse. From input variable with serial date&time.
Now in OpenOffice Basic (OpenOffice 3.1.2) function Second returns only seconds without decimals. Is there any hope to get time - seconds with two decimals? Maybe 3?
Thankyou for any good news about this
But if this is not possible, then I apologize for stupid question
Ponny
[Solved] Time seconds function - two decimals output
[Solved] Time seconds function - two decimals output
Last edited by Ponny on Sat Apr 22, 2017 8:15 pm, edited 1 time in total.
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
Re: Time seconds function - two decimals output
The Cell Function NOW() supports the fractions of the seconds. You can calculate the seconds and the fraction part of the seconds by a macro or by some cell functions.
Note: The resolution of the StarBasic function NOW() is 1 second. There is no fraction.
Note: The resolution of the StarBasic function NOW() is 1 second. There is no fraction.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Time seconds function - two decimals output
getSystemTicks
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: Time seconds function - two decimals output
Code: Select all
Sub F_get_NOW as string
oFunctionAccess = createUnoService("com.sun.star.sheet.FunctionAccess")
dDateTime = oFunctionAccess.callFunction("NOW", Array())
dTime = dDateTime - Int(dDateTime)
sTime = Format(dTime,"HH:MM:SS.00")
msgbox ("Current Timestamp:" & CHR(13) & sTime,64,"Date Time -> seconds with two decimal places")
End Sub
- MMove 1.0.6
- Extension for easy, exact positioning of shapes, pictures, controls, frames ...
- my current system
- Windows 10 AOO, LOLinux Mint AOO, LO
Re: Time seconds function - two decimals output
It works!
Thank you
Ponny
Thank you
Ponny
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2