I need to create a crystal formula to look for a specific number in a record, if that number exist then create a date/time variable. Look for a second record with a different specific number and create a second date/time var. Then calculate a date diff between the two var. Im new to crystal and am stumped any help would be appreciated. this is what I have and it obviously does not work. "EVNT_CD" 10 will always be a start date and "EVENT_CD" 11 will always be the end date. thanks dave
IF {WKWOEVENTS.WE_EVNT_CD} = 10
then local DateTimeVar d1 := {WKWOEVENTS.WE_EVNT_DT}+{WKWOEVENTS.WE_EVNT_TM}
IF {WKWOEVENTS.WE_EVNT_CD} = 11
then local DateTimeVar d2 := {WKWOEVENTS.WE_EVNT_DT}+{WKWOEVENTS.WE_EVNT_TM}
DateDiff ("h",d1,d2)