The < cannot be used in the actual nlist command as DOS will interpret the < character as a command to pipe a text file into the command. Therefore, the second line is incorrect.
The first line looks the better of the two apart from changing the | to a \ in the filename. SO the command should look something like:
NLIST USER WHERE "login time" GT 05/31/04 /S > C:\TEST\TEST.TXT
Type NLIST /? ALL for the help menus.
-----------------------------------------------------
"It's true, its damn true!"
-----------------------------------------------------