Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Chanty4u
MVP
MVP

RE:Dynamic date varies

Hi all,

i have small issue on  Date issue

REQ:

My date format field:    "Wednesday - 02-24-2016"

Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday

it varies day to day

so in this case

the first description max length is 9 which is wednesday

so  i need to get the format only  DD-MM-YYYY

my max lenght 9 only   so  while coming to wednesday its alrdy 9 and there is space and -  symbol.

here the day  coming dynamically....

So how can i do this?

Thanks in advance.

17 Replies
sunny_talwar

I don't see a difference in viewing it as a dimension vs. measure? All you want to see is the date in YYYYDDMM format? I guess have you tried -> Date(Date#(Right([VIEW DATE], 10), 'MM-DD-YYYY'), 'YYYYMMDD') as measure?

Chanty4u
MVP
MVP
Author

exctly sunny......

we hve taken as measure abve expression...same..

wen we tried with as dimension  abve expresion will givng exact date format.

but wen we use as   Measure  it givng as nulll?

what might be the reason?

sunny_talwar

Unless you have a field in a dimension which can uniquely show all your dates (new dates in YYYYMMDD), you will see Null(). The purpose of expression is to show aggregation. You can do Avg(Date) if you don't have a unique dimension, but I am not sure how will that be of any help.

Chanty4u
MVP
MVP
Author

Thanks sunny...

i will chk it tommorw and let you know.   if i need anything

Thanks for the info ....

Best

Suresh

sunny_talwar

No problem

Chanty4u
MVP
MVP
Author

Hi sunny,

as a dimension if i use

the previous logic

Date(Date#(Right(AIR_DATE, 10), 'YYYY-MM-DD'), 'YYYYMMDD')

it is timing out the sheet which iam trying to run

throws an error as "calculation timed out"

Is there any other alternative?

sunny_talwar

Unless you provide more details of what you are trying to do or share a sample, it would be difficult to give much advice man. Is AIR_DATE coming from a table which is not linked to anything else in that particular chart?

Not applicable

Hi chanty,

try this

Date(Date#(KeepChar('Wednesday - 02-24-2016','0123456789'),'MMDDYYYY'),'YYYYMMDD')