Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
b_garside
Partner - Specialist
Partner - Specialist

Easy way to check if a field is a Date or String...?

Is there an easy way to check if a field is a Date field or Not...?

I know Qlikview only knows them data types as Integers or strings, but I wanted to do this for some custom filtering logic I have.

Any ideas welcomed. I thought if I could use the $Date tag would make it easy or I may have to detect it by field name.

I'm using an If statement currently in this simplified statement.

If( $Field Like '*date*' , 'Date', 'String')

1 Solution

Accepted Solutions
b_garside
Partner - Specialist
Partner - Specialist
Author

The other way is to measure len of data field.

Dates are 5 digits long this works fairly well.

If( Len(Num($Field))=5 , 'Date', 'String')

View solution in original post

3 Replies
Anonymous
Not applicable

HI

Try this if(istext('1990-10-30 9:20'),'string','Date')

Regards

Harsha

b_garside
Partner - Specialist
Partner - Specialist
Author

The other way is to measure len of data field.

Dates are 5 digits long this works fairly well.

If( Len(Num($Field))=5 , 'Date', 'String')

Anonymous
Not applicable

if $(Field)='Pavan' then this will go wrong.........