bigint and unix time

Поиск
Список
Период
Сортировка
От Janiv Ratson
Тема bigint and unix time
Дата
Msg-id 9C103394ED80654B9DD6D9347E9D3001040F2014@es-ex1-il.essencesecurity.com
обсуждение исходный текст
Ответы Re: bigint and unix time  (Adrian Klaver <adrian.klaver@gmail.com>)
Список pgsql-sql
<div class="Section1"><p class="MsoNormal">Hi,<p class="MsoNormal"> <p class="MsoNormal">I have the following query:<p
class="MsoNormal"> <pclass="MsoNormal">select ticket as ticket, time as created, author as reporter, cast(extract(epoch
from(date 'now' - integer '30')) as bigint)<p class="MsoNormal">from ticket_change tc<p class="MsoNormal">where field =
'status'<p class="MsoNormal">and newvalue = 'reopened'<p class="MsoNormal">and time > extract(epoch from (date 'now'
-integer '30'))<p class="MsoNormal">order by time<p class="MsoNormal"> <p class="MsoNormal">I’m trying it get all
recordsthat their ‘time’ is within the past 30 days.<p class="MsoNormal">However, the time is bigint: 1287323899000000
<pclass="MsoNormal">While the extract(epoch from (date 'now' - integer '30')) is 1310677200<p class="MsoNormal"> <p
class="MsoNormal">Asyou understand, I always get all records …<p class="MsoNormal"> <p class="MsoNormal">How do I solve
it?<pclass="MsoNormal"> <p class="MsoNormal">Thanks,<p class="MsoNormal">Janiv.<p class="MsoNormal"> <p
class="MsoNormal"><b><spanstyle="font-size:8.0pt;font-family:"Verdana","sans-serif"; 
color:gray">Best regards,</span></b><span style="font-size:12.0pt;font-family:
"Times New Roman","serif""></span><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New
Roman","serif""> </span><pclass="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"; 
color:navy">Janiv Ratson</span></b><span style="font-size:12.0pt;font-family:
"Times New Roman","serif""></span><p class="MsoNormal"><b><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";
color:gray">Software Architect & Team Leader</span></b><span style="font-size:12.0pt;font-family:"Times New
Roman","serif""></span><pclass="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:gray">EssenceHome & Family
LTD.. (Part of Essence Group)<br/> Tel: </span></b><span style="font-size:12.0pt;font-family:"Times New
Roman","serif""></span><b><span style="font-size:8.0pt;font-family:"Tahoma","sans-serif"; 
color:gray">+972-73-2447779 </span></b><span style="font-size:12.0pt;
font-family:"Times New Roman","serif""> </span><b><span style="font-size:8.0pt;
font-family:"Tahoma","sans-serif";color:#FF6600">|</span></b><span style="font-size:12.0pt;font-family:"Times New
Roman","serif""></span><b><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:gray">Fax: </span></b><span
style="font-size:12.0pt;font-family:"TimesNew Roman","serif""> </span><b><span
style="font-size:8.0pt;font-family:"Tahoma","sans-serif";color:gray">+972-9-9564182 </span></b><span
style="font-size:12.0pt;font-family:"TimesNew Roman","serif""> </span><b><span
style="font-size:8.0pt;font-family:"Tahoma","sans-serif";color:#FF6600">|</span></b><span
style="font-size:12.0pt;font-family:"TimesNew Roman","serif""> </span><b><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:gray">Mobile: </span></b><span
style="font-size:12.0pt;font-family:"TimesNew Roman","serif""> </span><b><span
style="font-size:8.0pt;font-family:"Tahoma","sans-serif";color:gray">+972-507768822 <br/></span></b><b><span
style="font-size:8.0pt;font-family:"Tahoma","sans-serif";
color:#7F7F7F">Email: </span></b><span style="font-size:12.0pt;font-family:
"Times New Roman","serif""> </span><b><span style="font-size:8.0pt;font-family:
"Verdana","sans-serif";color:navy"><a href="mailto:janivra@essence-grp.com"><span
style="color:blue">janivra@essence-grp.com</span></a> </span></b><spanstyle="font-size:12.0pt;font-family:"Times New
Roman","serif""></span><b><span
style="font-size:8.0pt;font-family:"Tahoma","sans-serif";color:#FF6600">|</span></b><span
style="font-size:12.0pt;font-family:"TimesNew Roman","serif""> </span><b><span
style="font-size:8.0pt;font-family:"Tahoma","sans-serif";color:#7F7F7F">Site: </span></b><span
style="font-size:12.0pt;font-family:"TimesNew Roman","serif""> </span><b><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:navy"><ahref="www.essence-grp.com"><span
style="color:blue">www.essence-grp.com</span></a><br/><br /><br /></span></b><span
style="font-size:10.0pt;color:black">ThisE-mail and any attachments transmitted with it (if any) ("<b>E-mail</b>") is
privateand confidential, contains proprietary information belonging to the Essence Group and is intended only for the
intendedrecipient at the email address to which it has been addressed. Any review, retransmission, dissemination,
copyingor other use of, or taking of any action in reliance upon this E-mail, by persons or entities other than the
intendedrecipient is prohibited. Please notify the sender immediately by e-mail if you have received this E-mail by
mistakeand delete this E-mail from your system. Any opinions expressed in this E-mail are those of the sender and do
notnecessarily represent those of Essence Group unless otherwise stated expressly and the sender is authorised to do
so.E-mail transmission cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted,
lost,destroyed, arrive late or incomplete, or contain viruses. Essence Group therefore does not accept liability for
anyerrors or omissions in the contents of this E-mail arise as a result of e-mail transmission or for any damage caused
byany virus transmitted by this E-mail. <br /></span><span lang="EN-GB" style="font-size:18.0pt;font-family:Webdings; 
color:green">P</span><span lang="EN-GB" style="font-size:12.0pt;font-family:"Times New Roman","serif""> </span><span
style="font-size:9.0pt;font-family:"ComicSans MS";color:green">save a tree...please don't print this e-mail<i> unless
youreally need to.</i></span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""> </span><p
class="MsoNormal"><spanstyle="font-size:12.0pt;font-family:"Times New Roman","serif""> </span></div> 

В списке pgsql-sql по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: pgadmin debugger
Следующее
От: David Harel
Дата:
Сообщение: Re: pgadmin debugger