Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

date range using slider object

Hi,

I want to be able to select date ranges using slider objects.

I have created 3 slider objects with following expressions:

=SUBFIELD(DATE(SubField(RUN_DATE,' ',1),'DD/MMM/YYYY'),'/',1)-day

=SUBFIELD(DATE(SubField(RUN_DATE,' ',1),'DD/MMM/YYYY'),'/',2)-month

=SUBFIELD(DATE(SubField(RUN_DATE,' ',1),'DD/MMM/YYYY'),'/',3)-year.

the problem is that if I were to select some value for day and then select month, the selection in day is lost and so on.

is there any other way for the user to be able to select date ranges?

Thanks,

Anju

9 Replies
MayilVahanan

HI

Bring all the fields (day,month, year) from script itself, then use in slider object.

Hope that helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
srchilukoori
Specialist
Specialist

What is the format of RUN_DATE? could you please explain the task that you are trying to accomplish in more detail.

Not applicable
Author

Hi Ramasamy,

I used this piece of code ....

But, on reload, it says field not found for run_date_format.

 

MasterCalendar:

select run_date as run_date_format from tt_sdp_rpx_summary;

master:

load
//subfield(date(subfield(run_date_format,' ',1),'DD/MM/YYYY'),'/',1) as day_tt,
//subfield(date(subfield(run_date_format,' ',1),'DD/MMM/YYYY'),'/',2) as month_tt,
//subfield(date(subfield(run_date_format,' ',1),'DD/MM/YYYY'),'/',3) as year_tt
day(run_date_format) as day,
monthname(run_date_format) as month_tt,
year(run_date_format) as year_tt
Resident MasterCalendar;

drop table MasterCalendar;

tresesco
MVP
MVP

try this:

select run_date as run_date_format from tt_sdp_rpx_summary;

master:

load
day(run_date) as day,
monthname(run_date) as month_tt,
year(run_date) as year_tt
Resident MasterCalendar;

drop table MasterCalendar;

Not applicable
Author

Hi,

One example of run_date is 8/16/2013 12:00:00 AM,

i want to extract dd/mm/yyyy from this date and give a from date - to date selection option in the report.

Thanks,

Anju

Not applicable
Author

Hi,

I tried it... but it gives the same error ..... field not found<run_date>

Not applicable
Author

Hi,

PFA the report with run_date loaded from db.

I was not able to attach the report in the branched discussion.

Thanks,

Anju

tresesco
MVP
MVP

Run a reload in attached file and let know the result.

srchilukoori
Specialist
Specialist

Check the date expression from the attached app.

Calendar object gives an elegant way to choose a date rather than slider object.