Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Date Problem

Hi Expertise please find the attachment of the QVW file ..

I have added a filter which has R_Load Date field .

If i try to sort it by descending it is not considering
and also i have tried to set the max date, by using the below expression with the text object

=Date(Max({1}[R_Load Date]),'M/D/YYYY')

=Date(Max(All [R_Load Date]),'M/D/YYYY')

But nothing is working

Need help on this

Thanks in Advance

16 Replies
tresesco
MVP
MVP

Your date field has text values, you need to convert it to date values using date#(). To resolve the problems at the source reload the date field like:

Date(Date#([R_Load Date], 'MM-DD-YYYY'), 'M/D/YYYY') as [R_Load Date]
smilingjohn
Specialist
Specialist
Author

Hi MVP

I made the suggested changes at the script and reloaded the application. 

Date(Date#([R_Load Date], 'MM-DD-YYYY'), 'M/D/YYYY') as [R_Load Date]

 

after reloading i dont see any value in it ? 

tresesco
MVP
MVP

That means, date values in your source is not in 'MM-DD-YYYY' format. What is your source? How doe date values look like there? Replace the date#() format with that one.
smilingjohn
Specialist
Specialist
Author

Hi MVM 

Actaully the date at the DB itself is as shown in the below format .

date from sourcedate from source

and i have converted it to " date#(date(R_LOAD_DATE),'MM/DD/YYYY') as [R_Load Date]"

How do i deal with this ?

tresesco
MVP
MVP

So it's proper date values. And if you just want the date part (without time portion), you could load it like:
Load

Date(Floor(LOAD_DATE), 'M/D/YYYY')) as [R_Load Date]
smilingjohn
Specialist
Specialist
Author

Hi MVP , 

 

Thanks the date format conversion worked , but now i am not able to set the max date  , 

i have added a text object and it is not considering the max date , 

Please find the attachment of the QVW file . 

 

Thanks 

vipin_mishra479
Creator II
Creator II

Try =Date(Max(Reload))in text box
smilingjohn
Specialist
Specialist
Author

I want to set this in actions . 

when i land from another  sheet then the date should set to  max of reload date . 

vipin_mishra479
Creator II
Creator II

I have attached the file please check