Calculate new field based on values in another field

Discussion created by zackb11 on Feb 19, 2014
Latest reply on Feb 24, 2014 by 024fpt
I have a large file (~2.5 million rows) that contains a field of dates and times. There are 60 different dates in this field in the form YYYYMMDDHHMM. I want to add a new field such that the earliest times = 1, the second earliest = 2, and so on up to 60.

I understand that I can use an "if-else" statement in the Code Block, but I don't want to write out 60 different if statements.

I was thinking some sort of while loop that references items in a list of unique date values, but i can't seem to get anything to work.

Does anybody have any ideas?