Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Syntax problem with instruction "between" 2 times value

Status
Not open for further replies.

deliutza

Programmer
Feb 9, 2005
8
RO
I use:Crystal reports.net with SQLServer 2000
I have some problems in this formula:

whileprintingrecords;
shared stringvar FStart;//The hour when the pause begin;
shared stringvar FEnd; // The hourwhrn pausen ends;
TimeVar SetStart := TimeValue({@HourBeg});// The data field that holds my Start Time;

TimeVar SetEnd := TimeValue({@HourEnd}); // The data field that holds my End Time;

TimeVar StartPause := timevalue(FStart);
TimeVar EndPause := timevalue(FEnd);

What I need is to check if the StartPause and EndPause is between SetStart and SetEnd time value.
I don't find in crystal syntax something like in SQl instruction :
if StartPause between 'SetStart' and 'SetEnd' then
make some calculations


thanks in advance for any ideea!
 
Hi there,

have you tried

if startpause in setstart to setend and
endpause in setstart to setend then .....

HTH
 
It is a very simple solution...my mistake was that I don't transform the string value in time value before I make a test.
Thanks a lot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top