HELP With Converting TimeLocal() to calculate elapsed seconds since the start (00:00) of the current day?

 

Hi,

Could someone please help me.

I am trying to use seconds elapsed since the start of the day using my computers time in an EA using TimeLocal() and cannot figure out how to do this.

Any suggestions would be highly appreciated

 
int h=TimeHour(TimeLocal());
int m=TimeMinute(TimeLocal());
Print("h=",h," m=",m," sec=",h*3600+m*60);
 
datetime now = TimeLocal(); #define secondsPerDay 86400
int      secs= now - now%secondsPerDay;
 

Thanks blogzr3 and WHRoeder. I really appreciate the input.

Reason: