Playing with datetime... New comment lucidlamp 2007.06.28 16:16 Hi, Setting the date, manually, in Alert 2 to todays date, why does Alert 1 return a different value than Alert 2? Even using TimeLocal() as opposed to TimeCurrent() yields the same returns. #property indicator_chart_window int start() { datetime x=TimeYear(TimeCurrent()); datetime y=TimeMonth(TimeCurrent()); datetime z=TimeDay(TimeCurrent()); Alert("-----------------------------"); Alert("1: ", D'x.y.z 23:59:00'); Alert("2: ", D'2007.6.28 23:59:00'); Alert("3: ", x); Alert("4: ", y); Alert("5: ", z); } What am I doing wrong? Regards, lucidlamp what trade more than one time [ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. Wrong value on calculating difference in hours between TimeCurrent() and TimeLocal() New comment
Hi,
Setting the date, manually, in Alert 2 to todays date, why does Alert 1 return a different value than Alert 2? Even using TimeLocal() as opposed to TimeCurrent() yields the same returns.
#property indicator_chart_window
int start()
What am I doing wrong?
Regards, lucidlamp