Formatting date and time
Improperly formatted code modified by moderator. In the future, please use the CODE button (Alt-S) when inserting code.
credetarud: I have an MQ4 indicator that formats date and time like this: 26.10.2023 - 09:11:45. I've done some searching and can't find any example of how to do this using mq5. Can anyone assist?
Please study the MQL5 documentation for the following Time and Date function ...
Converts a datetime value into a variable of MqlDateTime structure type
Also study the following article ...
Sergey Pavlov, 2010.05.17 13:32
This article is a quick guide to MQL4 language functions, it will help you to migrate your programs from MQL4 to MQL5. For each MQL4 function (except trading functions) the description and MQL5 implementation are presented, it allows you to reduce the conversion time significantly. For convenience, the MQL4 functions are divided into groups, similar to MQL4 Reference.
Documentation on MQL5: Date and Time / TimeToStruct
- www.mql5.com
TimeToStruct - Date and Time - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Hi,
I have an MQ4 indicator that formats date and time like this:
26.10.2023 - 09:11:45
using this code:
I've done some searching and can't find any example of how to do this using mq5. Can anyone assist?
Thank you!