I could use some help comparing the date field in the below example. I used first. to get the first record by account and bypass. What i would like to do is compare the date field. For example, for the account 55555 i'd like the date lag to show 0 for the first observation, and then 1 for the second observation since it is a day later than the first instance for that account number and bypass combination. Observation 3 and 4 for account number 55555 should show a date lag of 0 for both as they share the same date. For account number 77777 id like the first and second record to show 0 as they are the same date, then the third record to show 2, and the final record to show 4. Thank you in advance. account date time bypass Firstacct 55555 1-Mar 1:00:00 AM 51 1 55555 2-Mar 1:30:00 AM 51 0 55555 3-Mar 1:30:00 AM 52 1 55555 3-Mar 1:45:00 AM 52 0 66666 1-Jan 2:10:00 AM 53 1 66666 3-Jan 2:10:00 AM 53 0 66666 1-Jan 2:10:00 AM 54 1 77777 1-Feb 3:00:00 AM 51 1 77777 1-Feb 3:15:00 AM 51 0 77777 3-Feb 3:30:00 AM 51 0 77777 5-Feb 3:45:00 AM 51 0
... View more