Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
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.

1 Solution

Accepted Solutions
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?

View solution in original post

17 Replies
sunny_talwar

You can try this may be:

Date(Date#(Right(DateField, 10), 'MM-DD-YYYY'), 'DD-MM-YYYY') as DateField

Chanty4u
MVP
MVP
Author

ok bro..let me try and  let u knw

am getting output as  016032

but i need the format below

YYYYMMDD

sunny_talwar

016032? For Wednesday - 02-24-2016? or you tried another date?

To get another format, you can change the Date() function format:

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

Chanty4u
MVP
MVP
Author

hi bro,

the issue is exctly..... the abve exp is working very much fyn.

As  that date field  "Wednesday - 02-24-2016"    associated wit  other field  so we need to get the

output  YYYYMMDD      but we need to remove abve date from the sheet?

is it possible?    if we remove the date out givng as null value?

sunny_talwar

As  that date field  "Wednesday - 02-24-2016"    associated wit  other field  so we need to get the


output  YYYYMMDD      but we need to remove abve date from the sheet?

is it possible?    if we remove the date out givng as null value?

I am not able to interpret these three statements above. Can you elaborate?

sunny_talwar

Are you doing this in the script or front end?

Chanty4u
MVP
MVP
Author

front end only....nt in script

sunny_talwar

Then this as the dimension isn't working?

Date(Date#(Right([VIEW DATE], 10), 'MM-DD-YYYY'), 'YYYYMMDD')

Chanty4u
MVP
MVP
Author

sunny that field we are usng as measure ....so  user dnt wat to c full date format  as see just as  yyyyddmm