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

Filtering based on Time Stamp.

Former Member
0 Likes
2,475

Hi All,

I have a DB Table that stores the created date and created time are being stored in a single field of type TIMESTAMP.

My requirement is: I have a report with a selection screen where the user enters the create date in a select-option and i have to fetch the records from this DB Table which are created in the date(s) entered in the select-option.

How can i write a SELECT Query for this.

Thanks & Regards,

Goutham.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,410

Hi Raghavendra,

Write the select query as follows:

Select fieldname from DB table nto internal table where timestamp in date.

where date is the date entered in the select optons on the selection screen.

In case you have any further clarifications,do let me know.

Regards,

Puneet Jhari.

Hi Raghavendra,

Write the select query as follows:

Select fieldname from DB table nto internal table where timestamp in date.

where date is the date entered in the select optons on the selection screen.

In case you have any further clarifications,do let me know.

Regards,

Puneet Jhari.

3 REPLIES 3
Read only

Former Member
0 Likes
1,411

Hi Raghavendra,

Write the select query as follows:

Select fieldname from DB table nto internal table where timestamp in date.

where date is the date entered in the select optons on the selection screen.

In case you have any further clarifications,do let me know.

Regards,

Puneet Jhari.

Read only

Former Member
0 Likes
1,410

HI,

You can convert the time stamp to DAte and time then use the date in the select statment.

CONVERT TIME STAMP tst TIME ZONE tz INTO DATE d TIME t.

Look at the below link for more info

http://www.s001.org/ABAP-Hlp/abapconvert_time-stamp.htm

Regards

Sudheer

Read only

Former Member
0 Likes
1,410

Hi Goutham,

Using DATE entered on selection screen, populate another RANGES (which is declared as DATETIMESTAMP).

Pass this RANGES to your SELECT and extract data.

Hope this helps.

ashish