Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
neetu_singh
Partner - Creator III
Partner - Creator III

Single date field split into dateto and datefrom

Hi Everyone,

I need a help , can anyone suggest me the solutions. I have a field as "Date Column" and want to split into two fields as "dateto" and "datefrom" in multibox or in calender object. i need this without using variables.

Example as shown below:

I have a field named as "DATE". want into two multibox as Date To and Date From

MultiBox1 Multibox2

DateFrom DateTo

yearfrom monthfrom dayfrom yearto monthto dayto.

Please revert back ASAP.

Thanks in advance

6 Replies
brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

please put the function in the script, because expressions in a list- or multibox can not be sorted.

What is the content in your DATE-field? is it a string like: 2010/6/15-2010/6/21? Then you can split the string with left, mid and right:

left( Date, 4 ) where Date = 1997-07-14 returns 1997

right( Date,2 ) where Date = 1997-07-14 returns 14

mid( Date,3,2 ) where Date = 970714 returns 07



Not applicable

Hi

We also want solution of this problem .

Regards

Ashish Srivastava

neetu_singh
Partner - Creator III
Partner - Creator III
Author

Hi Martina,

Thnks for ur reply. But i dn't want to split into year month and date.

i want to use a single "Date" in two ways one which gives "ToDate" and another gives "FromDate".

user can select randomly from both. if he want to see the data from 2010/1/01 to 2010/2/25. then he can select 2010/1/01 from "FromDate" field and 2010/2/25 from "ToDate".

Hope now u can understand my requirement.

If u have any solution related to this. Please reply ASAP.

I m very thankful to u

Neetu Singh

johnw
Champion III
Champion III

Well, attached is a horrible solution, at least if you have very many dates. I've joined the date field to itself twice to produce every combination of date range and the dates in that range. Works great for the sample, but if you have 1000 dates, you'll have a billion rows before it narrows things down.

It seems like you SHOULD be able to just have a FromDate and a ToDate table separate from the main data, then OnSelect, trigger an action to select the Dates in the range. So far I've been unsuccessful at making it work (I'm new to actions).

You might also consider a multi-value slider object on the date field.

Not applicable

I want to know the answers too. Pls help.

neetu_singh
Partner - Creator III
Partner - Creator III
Author

Hi John,

Thanks a lot for your reply. I need something like that.

Regards

Neetu Singh