Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

srinivasa1
Contributor

Date conversion

Hi,

Im just trying to use databas date like 20121016 into qlikview as 10/16/12(MM/DD/YY) but im getting result as '6/19/56989 

Can pls guide me how i can format this as 10/16/12(MM/DD/YY).

Thanks in advance.

Tags (1)
8 Replies
MVP
MVP

Re: Date conversion

Try like

=Date(Date#(20121016 ,'YYYYMMDD'),'MM/DD/YY')

resp.

=Date(Date#(DATEFIELD ,'YYYYMMDD'),'MM/DD/YY')

srinivasa1
Contributor

Re: Date conversion

Thanks for your reply but im applying this result in barchart  comes as as group or single staked row.

Re: Date conversion

Do script some thing like

=Date(Date#('20121016' ,'YYYYMMDD'),'MM/DD/YYYY')

=Date(Date#(DateField,'YYYYMMDD'),'MM/DD/YYYY')

Regards,

Anand

Re: Date conversion

If use in bar chart make modified date field or use this script in your expression

Date(Date#(DateField,'YYYYMMDD'),'MM/DD/YYYY') as ModifiedDateField

Regards,

Anand


MVP
MVP

Re: Date conversion

srinivasa1, I think I have not fully understood your issue.

Could you post a little sample qvw, or some screenshots of your chart and some sample lines of your data?

Not applicable

Re: Date conversion

try:

date( mid(20121016,5,2)  &'/' &right(20121016,2) &'/' &mid(20121016,3,2) )

or

date( mid(YourDate,5,2)  &'/' &right(YourDate,2) &'/' &mid(YourDate,3,2) )

srinivasa1
Contributor

Re: Date conversion

Thaknks swuel for your reply .im sorry for dealy to reply as was bit busy some other work..i found some alternative soluation for that..let me try that.once again thanks for your effort..

srinivasa1
Contributor

Re: Date conversion

Thaknks l for your reply .im sorry for dealy to repl y as was bit busy some other work..i found some alternative soluation for that..let me try that.once again thanks for your effort..

Community Browser