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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cannot search for a specific year in a date text box (only month)

Hi,

I have a classical text box with a field date in it. The original format is date so like 45535. In the text box, I put a format date (YYYY/MM/DD) and when searching in the text box, only the month are searched....

So if I type 2, only the date with 2 in the month is selected but not the year starting by 2.... Typing 2012 will give me no result...

I tried to change the date format to YYYYMMDD ou YYYY_MM_DD but no luck....

Thanks in advance for your help!

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You have two options - change the Default Search Mode (Properties  | General for the list box) to 'Use Wildcard Search' or type in the wildcards yourself. For example *3*  returns values with 3 anywhere in the date.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

14 Replies
ashwanin
Specialist
Specialist

Change date format at Script level by

Date ( FiledName,'DD-MMM-YYYY') as FieldName

Not applicable
Author

Hi,

Change the Date Format at Document Setting --> Number .It works, I had similar kind of issue.

Thank you.

Not applicable
Author

Thanks I'm trying it....

Not applicable
Author

Thanks but if I put number my date will look like 45532, 45533,.... so it's not usable

Not applicable
Author

Under Number Tab, change the format as Data.

Not applicable
Author

I tried it's not working.

Thanks

sunilkumarqv
Specialist II
Specialist II

TRY THIS AT YOUR SCRIPT

=date(date#(DateStringField, 'YYYY-MM-DD'), 'DD-MM-YYYY') AS DateField

Not applicable
Author

ok I tried it's not working.

If I let the format by default my date are now 12-dec-2010

When I type 20, it will give me no answer.... When I type 19 it will select only 19 as day not year.

If I changed back the format only in text box to M/D/YYYY, it will select also only the day.

If I changed back the format only in text box to YYYY/M/D, it will select the first 2 digit of year when type 19 but if I type another number like 198, nothing is available but I do have date like 1990-10-24

Not applicable
Author

Thanks I'm trying it!

ok it's not working