See the following code I tried:
MqlDateTime time;
TimeToStruct(TimeCurrent(),time);
string currenttime=IntegerToString(time.year)+"-0"+
IntegerToString(time.mon)+"-"+
IntegerToString(time.day)+ " "+
IntegerToString(time.hour)+ ":"+
IntegerToString(time.min)+ ":00";
The output of the following was: 2018-7-25 15:8:00 where I was expecting the output as 2018-07-25 15:08:00, that is in 2 values the month and the min. But it is not converting the zero. The date time what I am giving is in the format 2018-07-25 15:08:00, which is I am expecting to get after converting to string. But got something else.
Please help me.