THe following isn't a macro but it does what you requested...
First format the IP addresses...
click advanced edit
tabstop value 6
to a global search/replace put a check in regular expression, replace from top of file.
find a "." replace with "^t." (neither expression has quotes its here simply in this note)
click format "tabs to spaces"
put yourself column edit mode (alt-c)
Highlight first 3 cols of entire file.
(a fast way put cursor in column 4 and hit ctrl-shift-end)
Now right justify this highlighted text (click column "right justify")
do a global search replace ON your SELECTION (see radion button)
replacing a space " " with zero "0" (no quotes)
Do this with all four of your Ip addresses.
The IP address will now be zero padded but have embeded spaces.
do a global search/replace of " ." with "." to get the spaces out of the IP addresses.
lastly the tricky part about sorting the date within UE.
The only thing that comes to mind is to do another column edit
Highlight the three chars that form the month and
replace (IN SELECTION)
"jan" with "01"
"feb" with "02"
"mar" with "03"...
once your done you can click "file" "sort" "advanced sort options"
and fill in upto four keys which should work for you since
year, month, day and time are all in their own columns.