Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
shirleyc40
Creator
Creator

Passing in a function in Date#

I'm trying to compare two dates, and one of them is a date I get from SubField(GetFieldSelections(eventDate), ',', -1) because I have a date picker and getting the boundary date. However, when I do num(date#(SubField(GetFieldSelections(eventDate), ',', -1))), it returns null. I thought date# takes in a string, which is what subField returns?? I'm truly confused

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

May be there are spaces

Num(Date#(Trim(SubField(GetFieldSelections(eventDate), ',', -1)), 'M/D/YYYY'))

View solution in original post

5 Replies
sunny_talwar

What format do you get for the date when you use this

SubField(GetFieldSelections(eventDate), ',', -1)

If it returns something like this 06/16/2020 (MM/DD/YYYY), you can try this

Num(Date#(SubField(GetFieldSelections(eventDate), ',', -1), 'MM/DD/YYYY'))
shirleyc40
Creator
Creator
Author

Still null 

shirleyc40_0-1592320648953.png

My intent was to find the rows with start date (which is the min of event dates per quote) after the event date selection. But I can't seem to get them to compare correctly. 

sunny_talwar

How about this

Num(Date#(SubField(GetFieldSelections(eventDate), ',', -1), 'M/D/YYYY'))
shirleyc40
Creator
Creator
Author

Still the same

sunny_talwar

May be there are spaces

Num(Date#(Trim(SubField(GetFieldSelections(eventDate), ',', -1)), 'M/D/YYYY'))