Conversion of date time string to milliseconds and vice versa
-
Hello,
I need to convert date time string [which i can construct in suitable format, if required] to milliseconds [since epoch time] and vice versa in QML/JS.
Is there any API available for this.???another doubt I have, is there any different between QML's 'property date' type and JavaScripts's 'Date' object.???
-
I don't know if there is such functionality in QML directly, but in any way you can export custom function to the QML space and use it for format conversion... Take a look at "Extending QML Functionalities using C++"http://doc.qt.digia.com/qt/qtbinding.html and "Using QML Bindings in C++ Applications":http://doc.qt.digia.com/qt/qtbinding.html
-
This can help?:
http://www.epochconverter.com/programming/#javascript