[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] Sysdate
- Subject: RE: [sqr-users] Sysdate
- From: "Jim Womeldorf" <jwomeldo@fastenal.com>
- Date: Tue, 13 Sep 2005 09:29:47 -0500
- Delivery-date: Tue, 13 Sep 2005 09:30:51 -0500
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
- Thread-index: AcW4bHFU62gj746oSIyG7r/R4MUELgAAuDjQ
- Thread-topic: [sqr-users] Sysdate
Hi Radhika,
If you are on Oracle try using trunc()
where trunc(a.audit_stamp) = trunc(sysdate
Jim
-----Original Message-----
From: sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org
[mailto:sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org] On Behalf Of
radhika reddy
Sent: Tuesday, September 13, 2005 9:04 AM
To: sqr-users@sqrug.org
Subject: [sqr-users] Sysdate
Hi,
I am trying to retrieve rows which are equal to sysdate. The date
field stored on ps_audit_addresses is in the format of date
time(9/13/2005 8:45:33 AM). By doing the following I am able to achieve
it. But, i am wondering is there any other way where instead of getting
all the rows from PS_AUDIT_ADDRESSES and then checking whether Audit
Stamp is equal to SYSDATE?
See, i tried using SUBSTR in sql but it didn't work.
begin-select
a.emplid,
a.audit_stamp ×tamp
display $sysdatetime !here i get 13-SEP-2005_09:50:49_AM
let $sysdate1 = substr($sysdatetime,1,11)
#debugH show $sysdate1 !13-SEP-2005
show 'timestamp:' ×tamp !13-SEP-2005
If $auditimestamp = $sysdate1
show 'transaction on that date' !both are
equal
else
show 'no transactions'
end-if
from ps_audit_addresses a
!where substr(a.audit_stamp,1,11) = SYSDATE END-SELECT
Thanks,
Radhika
_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how
to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users