[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EquisMetaStock Group] Coding for period between 2 dates using single date input format



PureBytes Links

Trading Reference Links

How do you code the period between two dates if single date input 
format is being used?

 { Start date }
dt1:=Input("First date (mmddyyyy) :",1011960,12312100,1072008);

 { End date }
dt2:=Input("Second date (mmddyyyy) :",1011960,12312100,1072008);

With the metastock date functions, using the metastock date input we 
can code it as follows:

 { Start }
start:=Year()>sy 
OR (Year()=sy AND (Month()>sm 
OR Month()=sm AND DayOfMonth()>=sd)); 

 { End }
end:=Year()<ey 
OR (Year()=ey AND (Month()<em 
OR Month()=em AND DayOfMonth()<=ed));

event:=start and end;

Please help

Regards

Arun


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/equismetastock/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:equismetastock-digest@xxxxxxxxxxxxxxx 
    mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/