Message Archive Timestamp Calculation

I’m using OpenFire 3.5.2 with the Montioring Plug-in and a SQL Server 2005 database. Is there an easy way to convert the timestamp in ofMessageArchive to the actual date? Or is there a way to say timestamp minus 30 days in an SQL Server query? I’d like to set up some routine to regularly purge the archive and some easy ways to work with the timetamp would be very useful.

Hi Jerry,

The value that is stored in the sentDate field is the number of milliseconds since January 1, 1970, 00:00:00 GMT. I’m not very familiar SQLServer so I don’t know what sort of date/math functions it supports but the calculation is pretty straight forward even if you have to resort to doing a bit of multiplication.

Hope that helps,

Ryan

Thanks. in the SQL Server database the timestamp is stored as a bigint. I didn’t know what the base data & time were nor what a value of 1 meant. Based on you info it should not be a problem.

Good to hear. Good luck!