Openfire Message Archiving Reports

I am trying to write a report that pulls messages in bulk from the message archive database. Here is my HSQL Script:

SELECT FROMJID,TOJID,SENTDATE,BODY FROM “PUBLIC”.“OFMESSAGEARCHIVE” WHERE “FROMJID” LIKE ‘jane%%’ AND “TOJID” LIKE ‘john%%’ AND “BODY” LIKE ‘%%’ OR “FROMJID” LIKE ‘john%%’ AND “TOJID” LIKE ‘jane%%’

The script works fine, and I can pull the information just fine. My question is, how do I convert the java long date (its a bunch of numbers right now) to a regular date and time format so that I can read it correctly.

I have included a screen shot of the data that I get from the report, it shows the senddate column the way it is right now. I would like to convert that to a MM-DD-YYYY format with a HH:MM:SS time format.

Also, does anyone know how to export that data out to a csv file. Any help would be greatly appreciated.