Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

problem while displaying data for previous dates

Former Member
0 Likes
549

Hi All ,

Below is my selection criteria .

Type Of Object

DATE

TIME

My requirement is as below

When user enters date /time, it should download or display only those records which were created after that date. Say for e.g. after i have added parameter for date/time and I enter Object type BUS2007, date 28 Feb 2013 & time 07:10:23 and execute the program, it should show / download ZERO attachments. As existing attachment was created on 20,130,205,055,431 (2013 Feb 05 / 05:54:31 Hrs). But if I enter before date (30 Jan 2013 / 00:00:00), it should show 1 attachment.

how to get data for creation of current or previous dates ?

I have written below code i'm unable to get data for previous dates .

select INSTID_A

          TYPEID_A

          INSTID_B

     from SRGBTBREL

     into table t_SRGBTBREL

     where TYPEID_A in S_TYPEID

     and UTCTIME <= G_UTCTIME

     and RELTYPE in (C_ATTA,C_NOTE,C_URL) .

4 REPLIES 4
Read only

Former Member
0 Likes
515

hi,

have u declared

data: G_UTCTIME type TZNTSTMPS.

if u take char15 it will not work.

Read only

former_member217544
Active Contributor
0 Likes
515

Hi,

Show your declaration part also.

Regards,

Swarna

Read only

Former Member
0 Likes
515

Hi smitha,

Use 'LE'  instead of  '<=' in your select query

Read only

Former Member
0 Likes
515

Coment time in your select statement because time can only be compared in 24hr time .

*  and UTCTIME <= G_UTCTIME comment this line.

Regards,

Rahul Singh