Function ELTime_sToString

Studies that have been contributed to the community by other users. If you’ve got something useful to share, that’s great!
User avatar
Januson
Posts: 119
Joined: 18 Apr 2007
Location: Denmark

Function ELTime_sToString

Postby Januson » 18 Nov 2008

For some strange reason, I couldn't find any functions to convert Time_s to a formatted time hh:mm:ss

So I wrote one:

Code: Select all

[LegacyColorValue = true];

{ This function accepts an EL time and returns a formatted time string hh:mm:ss }
{ Functionname: ELTime_sToString }
{ Written by Januson Nov2008 }

inputs: TimeSelect( numericsimple );

var: timestr("");
timestr = RightStr("0" + NumToStr(TimeSelect,0), 6);


ELTime_sToString = LeftStr(timestr, 2) +
":" + MidStr(timestr, 3, 2) +
":" + RightStr(timestr, 2);

brodnicki steven
Posts: 407
Joined: 01 Jan 2008
Been thanked: 3 times

Postby brodnicki steven » 20 Nov 2008

Great function, Thanks !


Return to “User Contributed Studies and Indicator Library”