Records can only be achieved at competitions, except for long distance events (400m and over), which can be achieved at time-trials.  The age is on the day of the competition or time-trial.  They can be taken from relay events if the swimmer was first in the relay and the time was recorded electronically.