I have a report that shows these fields (among others):
Ref# CloseTime
When the reference numbers are the same, I need to compare
the CloseTime fields and print the one that is the earliest
time-wise.
Example:
205819 1/14/04 15:10
205819 1/14/04 15:36
205819 1/15/04 6:54
205835 1/14/04 14:57
I would need to print:
205819 1/14/04 15:10
I am using this formula:
if ({ref_num} = Next({ref_num}))
then
if ({act_log.time_stamp} >
Next({act_log.time_stamp}))
then
DateAdd ("s",({act_log.time_stamp}-21600),#1/01/1970#);
This correctly prints the
205819 1/14/04 15:10,
but also prints
205819 1/15/04 6:54.
I am guessing this happens because of the date change to
the fifteenth.
I keep getting the error message:
"Dates must be between year 1 and year 9999" when
I try to convert the number to a date for more granular comparison purposes.
If anyone has a way to do this, I'd appreciate the help.
Thanks,
rorymo
Ref# CloseTime
When the reference numbers are the same, I need to compare
the CloseTime fields and print the one that is the earliest
time-wise.
Example:
205819 1/14/04 15:10
205819 1/14/04 15:36
205819 1/15/04 6:54
205835 1/14/04 14:57
I would need to print:
205819 1/14/04 15:10
I am using this formula:
if ({ref_num} = Next({ref_num}))
then
if ({act_log.time_stamp} >
Next({act_log.time_stamp}))
then
DateAdd ("s",({act_log.time_stamp}-21600),#1/01/1970#);
This correctly prints the
205819 1/14/04 15:10,
but also prints
205819 1/15/04 6:54.
I am guessing this happens because of the date change to
the fifteenth.
I keep getting the error message:
"Dates must be between year 1 and year 9999" when
I try to convert the number to a date for more granular comparison purposes.
If anyone has a way to do this, I'd appreciate the help.
Thanks,
rorymo