datetime
-
Hello how to use only hours and minutes of "datetime" input i marked them with red line
(any solution except using "int" and "string")

-
try use Component format
-
@amiinkiaei how can you show it
-

-
@amiinkiaei it using "string"

-
@amiinkiaei i want to use "datetime" input because user can't change it to weird text "when using string" or weird number "when using int".
when input type is "datetime" they can only change the time. -
just made enum bro
-
@amiinkiaei show me your idea with pic
-
datetime currentTime = TimeCurrent(); // Mendapatkan waktu saat ini
int hour = TimeHour(currentTime);
int minute = TimeMinute(currentTime);
string ampm = "AM";// Konversi format 24 jam ke 12 jam
if(hour == 0) {
hour = 12; // 12:00 AM
} else if(hour == 12) {
ampm = "PM"; // 12:00 PM
} else if(hour > 12) {
hour -= 12;
ampm = "PM"; // Setelah 12 siang
}string timeStr = StringFormat("%02d:%02d %s", hour, minute, ampm);
Print("Waktu saat ini (format 12 jam): ", timeStr); -
@amiinkiaei how should i do it in fxdreema or in mql
-
@amiinkiaei how should i do it in fxdreema or in mql ??
-
Just copy the suggested code into a grey 'custom mql code' block.
-
@amiinkiaei no any input for this

-
@amiinkiaei ?