format time

Questions about MultiCharts and user contributed studies.
User avatar
arnie
Posts: 1589
Joined: 11 Feb 2009
Location: Portugal
Has thanked: 478 times
Been thanked: 509 times

format time

Postby arnie » 26 Oct 2017

Is there a way to see the correct time format in the hint window?
When moving my mouse over the bars, I have, looking at the screenshot example, 10.109.00.
I would rather see 01:01:09.

I would need something like this:

Code: Select all

Plot1(FormatTime("hh:mm:ss", bartime));


Any ideas?

Thanks!

format_time.jpg
format_time.jpg (61.55 KiB) Viewed 138 times

User avatar
Anna MultiCharts
Posts: 74
Joined: 14 Jul 2017
Has thanked: 2 times
Been thanked: 14 times

Re: format time

Postby Anna MultiCharts » 27 Oct 2017

Hello, arnie!

PowerLanguage doesn’t have such pre-built function as bartime. Please, check the code of this function and the way it should be calculated.

User avatar
arnie
Posts: 1589
Joined: 11 Feb 2009
Location: Portugal
Has thanked: 478 times
Been thanked: 509 times

Re: format time

Postby arnie » 27 Oct 2017

Anna MultiCharts wrote:Hello, arnie!

PowerLanguage doesn’t have such pre-built function as bartime. Please, check the code of this function and the way it should be calculated.


You missed the point.
bartime is just a variable on my code. I'm interested in changing the format in which time is being displayed in the hint window.

Instead of 10.109.00, I would like to see 01:01:09.
Is it possible to do that?

User avatar
JoshM
Posts: 2089
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1525 times
Been thanked: 1485 times
Contact:

Re: format time

Postby JoshM » 28 Oct 2017

arnie wrote:Instead of 10.109.00, I would like to see 01:01:09.
Is it possible to do that?

As far as I know, that's not possible, unfortunately. If you plot a string on the chart with `PlotN()`, it shows as "N/A" in the chart's Data Window and chart hint.

I don't know of a workaround for this.
These users thanked the author JoshM for the post:
arnie

User avatar
Anna MultiCharts
Posts: 74
Joined: 14 Jul 2017
Has thanked: 2 times
Been thanked: 14 times

Re: format time

Postby Anna MultiCharts » 03 Nov 2017

arnie,

as we don't see the way your function/variable is calculated we cannot recommend anything.
Please, provide the full code so that our engineers could analyze it.


Return to “MultiCharts”