How to use function "FormatTime"

Questions about MultiCharts and user contributed studies.
Joerg
Posts: 24
Joined: 13 Feb 2007

How to use function "FormatTime"

Postby Joerg » 17 Apr 2008

Hello,

I´m trying to export data out of the chart in an individual format. Therefore the function FormatTime seems very useful. When I use

Print(File("C:\temp\test.txt"),ELDateToString(Date),FormatTime("HH:mm",computerdatetime));

it works fine. But I would like to export the Time of each bar. If I use Function "Time" (which normally gives the BarTime back) instead of "computerdatetime" I just get Zeros. Does someone has an idea?

Thanks

Joerg

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 17 Apr 2008

Hi Joerg,

Try the code below:

Print(File("C:\temp\test.txt"),ELDateToString(Date),FormatTime("HH:mm",eltimetodatetime(time)));

Joerg
Posts: 24
Joined: 13 Feb 2007

Postby Joerg » 18 Apr 2008

This works fine. Thanks a lot.

Joerg

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 18 Apr 2008

NP:-)


Return to “MultiCharts”