how to get value of the year、,month、day、hour、minute、second from "2015-8-14 04:30:00"

how to get value of the year、,month、day、hour、minute、second from "2015-8-14  04:30:00"

 "2015-8-14  04:30:00"is string

 thank u~~ 

bombwhisper:

how to get value of the year、,month、day、hour、minute、second from "2015-8-14  04:30:00"

 "2015-8-14  04:30:00"is string

 thank u~~

See MqlDateTime.


   datetime mydate=D'2015.08.14 04:30';
   MqlDateTime date;
   TimeToStruct(mydate,date);
Also, try: StringToInteger(StringSubstr(...))
Alain Verleyen:
See MqlDateTime.


3x~
Xiangdong Guo:
Also, try: StringToInteger(StringSubstr(...)
bombwhisper:
Thanks~