1) PostgreSQL
SELECT
'1970-01-01 00:00:00 GMT'::timestamp with time zone + ((ofmessagearchive.sentdate/1000)::text)::interval AS time,
ofmessagearchive.fromjid AS from,
ofmessagearchive.tojid AS to,
ofmessagearchive.body AS message
FROM
public.ofmessagearchive
WHERE
( ofmessagearchive.fromjid = '<JID of user>'
OR
ofmessagearchive.tojid = '<JID of user>' )
AND
ofmessagearchive.sentdate > EXTRACT(EPOCH FROM timestamp with time
zone 'start time in format <YYYY-MM-DD HH-MM-SS>') * 1000
AND
ofmessagearchive.sentdate < EXTRACT(EPOCH FROM timestamp with time
zone 'end time in format <YYYY-MM-DD HH-MM-SS>') * 1000
ORDER BY 1;
Комментариев нет:
Отправить комментарий
Примечание. Отправлять комментарии могут только участники этого блога.