Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

How the calender works in case of date format is different in qvd..

Hi all,

1/2/2013 = 1st Feb 2013 and

2/1/2013 = 2nd jan 2013 or 1st feb 2013

What logic is used to check the date format in QlikView..

How it will identify the correct date..

what are the steps need to verify in such scenario..

Thanks in advance.

1 Solution

Accepted Solutions
mov
Esteemed Contributor III

Re: How the calender works in case of date format is different in qvd..

You can use date#() function to tell the QV script how to read the date field.  If it is 1/2/2013 = 1st Feb 2013, use

date(date#(FieldName, 'D/M/YYYY'))

if it is 1/2/2013 = 2nd jan 2013, use

date(date#(FieldName, 'M/D/YYYY'))

in any case, you need to know how the data is formatted in the data source

Regards,

Michael

3 Replies
MVP
MVP

Re: How the calender works in case of date format is different in qvd..

In the beginning of the script of your application you will find the default value date is set(which comes by default for any application based on preference), you can change that. QV reads the date field by default in that format.

Not applicable

Re: How the calender works in case of date format is different in qvd..

but how will works on above problem..

if  we specified particular format and only that format accepted then it will give incorrect charts

so is there any mechanisum to convert or read particular date format so that it can identify correct

date format.

Kindly help in this situation.

mov
Esteemed Contributor III

Re: How the calender works in case of date format is different in qvd..

You can use date#() function to tell the QV script how to read the date field.  If it is 1/2/2013 = 1st Feb 2013, use

date(date#(FieldName, 'D/M/YYYY'))

if it is 1/2/2013 = 2nd jan 2013, use

date(date#(FieldName, 'M/D/YYYY'))

in any case, you need to know how the data is formatted in the data source

Regards,

Michael

Community Browser