Create file with date format as file name  [SOLVED]

Questions about MultiCharts and user contributed studies.
kinwai
Posts: 89
Joined: 03 May 2019
Has thanked: 12 times
Been thanked: 1 time

Create file with date format as file name  [SOLVED]

Postby kinwai » 25 Jun 2021

I would to create log file and use date as file name using the below code, but it always return as “0.txt”, anything wrong?

Code: Select all

file(“c:\logs\" + FormatDate("dd-MM-yyyy", date) + ".txt");

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Create file with date format as file name

Postby TJ » 26 Jun 2021

Please go to the Wiki

8 PowerLanguage Keyword Reference
Date and Time Routines‎ (55 P)
look up FormatDate

There are usage syntax examples


Return to “MultiCharts”