The timenum() returns the value as : 101155
Can we get the value as 10 : 11 : 55
Please help with the code if it is possible.
The timenum() returns the value as : 101155
Can we get the value as 10 : 11 : 55
Please help with the code if it is possible.
It's easy if you use DateTime()
instead of Timenum()
. In such case you can use DateTimeToStr()
:
printf( "\nDate and Time --> " + DateTimeToStr( SelectedValue( DateTime() ), 3 ) );
printf( "\n\nOnly Time --> " + DateTimeToStr( SelectedValue( DateTime() ), 5 ) );
https://www.amibroker.com/guide/afl/datetimetostr.html
https://www.amibroker.com/guide/afl/datetimeformat.html
Thanks a lot.
You made my DAY!!!
Just a little thing again:
PL1 = ValueWhen( signum == signumstart1 , vs,1 );
The above code gives result as 9.845621 for example. But I want only 2 places after decimal.
Please let me know how to do it.