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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Possible Issue with IF THEN

Status
Not open for further replies.

Butlertl

IS-IT--Management
Mar 15, 2006
54
US
After then IF Then statement....all after DAYS * are being ignored....what am I doing wrong?

WhileReadingRecords;
NumberVar Days := {@Work Day}; // The field that calculates your business days
TimeVar SetStart := TimeValue( "6:00"); // The start your work day
TimeVar SetEnd := TimeValue("18:00"); // The end your work day

TimeVar StartTime := TimeValue({TTS_Main.Date_Opened});// The data field that holds your Start Time
TimeVar EndTime := TimeValue({TTS_Main.DateClosed}); // The data field that holds your End Time

If StartTime >= SetEnd then
StartTime = timevalue ( "06:00")
else
TimeVar StartTime := TimeValue({TTS_Main.Date_Opened})

Days * ((SetEnd - SetStart) / 3600)
- ((SetEnd - EndTime) / 3600)
- ((StartTime - SetStart) / 3600)
 
Do you have a semi-colon after the "TimeVar StartTime := TimeValue({TTS_Main.Date_Opened})" line or is that just a typo in what you've posted? If it's not there, try adding one.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top