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

last 30 days should display in slider

hi to all,

can anyone tell me how to display only last 30 days dates in slider.

today is 19-03-2011 my need is to display last 30 days dates in slider i.e; 18-02-2011 to 19-03-2011 in slider.

I am attaching some screenshots which i had done for slider but it is not working which i want exactly. Please view this and reply what is the worng in expression.

error loading image

error loading image

error loading image

1 Solution

Accepted Solutions
Not applicable
Author

Hi venkat,

let's say your datefield is called RawDate, then try to use the following expression:

=if(RawDate >= Today()-30 and RawDate <= today(), RawDate)


HtH

Roland

View solution in original post

7 Replies
Not applicable
Author

Hi venkat,

let's say your datefield is called RawDate, then try to use the following expression:

=if(RawDate >= Today()-30 and RawDate <= today(), RawDate)


HtH

Roland

Not applicable
Author

Thank you very much Roland,

This is what i am expecting and required, and again thanks Roland.

Not applicable
Author

hi Roland,

Can i make dynamic selection like last 30 or 20 or 10 days, It should be User friendyl i.e; the user click on 10 in listbox then the slider should display only last 10 days data.

How can i work on this ? i am expecting a correct answer from you as same as your previous post.

Thnks

Not applicable
Author

Hello again venkat,

glad to help you.

My sunday afternoon idea is using a variable (e.g. called vStart) and an inputbox for it. Whenever the users change its value the slider will be influenced by it. See input box properties --> constraints tab for more than inputting only a single value. Here is the modified expression:

=if(RawDate >= Today()-vStart and RawDate <= today(), RawDate)


RR

Not applicable
Author

hi Roland, how r U?

Your Previous post is working with variable.Thanks. You helped me a lot.

Thnks

Not applicable
Author

HI Roland,

Again i am back with a new Question.

How can i make the "Time" field in slider to display in between 6 A.M to 6 P.M.

Is it possible to do with only Expression ?

The below is the Time field displays its data in Listbox.

Not applicable
Author

Hello Venkat,

thanks, I am fine. A lot of work, but this is allright. Hope you enjoyed QV meanwhile.

You can use a very similar expression for your timefield. Watch the code below:

=if(RawTime >= '06:00:00' and RawTime <= '12:00:00', RawTime)


Use single-quotes to compare and (of course) the correct format. I am used to the german date-format, this is slighty different to yours.

RR

P.S.:

When you have a brand new question, don't hesitate to post it. I think it's better then to open a new thread. So other people can and (will) participate because a new thread is a new question (and challenge). For this reason you might get your solution(s) earlier, and not waiting for busy roland 😉