Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date format not correct

Good morning, I have the following problem:


using the following formula:
dates (date # (CNDARS & CNDARA & CNDARM & CNDARG, 'YYYYMMDD'), 'DD-MM-YYYY') as [DATA FATTURA],

but I get errors because some values retrieved and formatted by the formula are wrong while others are correct.

The line in yellow have a wrong result of the formula.

Anyone have any ideas ?


Thans,

Giovanni

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Single digit months are causing the issue. Try like:

dates (date # (CNDARS &CNDARA &'-'& CNDARM &'-'& CNDARG, 'YYYY-MM-DD'), 'DD-MM-YYYY') as [DATA FATTURA],

View solution in original post

4 Replies
Not applicable
Author

Also add that there are lines that do not have the field enhanced by the formula.


Thanks,

Giovanni

tresesco
MVP
MVP

Single digit months are causing the issue. Try like:

dates (date # (CNDARS &CNDARA &'-'& CNDARM &'-'& CNDARG, 'YYYY-MM-DD'), 'DD-MM-YYYY') as [DATA FATTURA],

mukesh24
Partner - Creator III
Partner - Creator III

Hi,

Try below expressions

1.

dates (date # (CNDARS & if(len(CNDARA) = 1,'0'&CNDARA,CNDARA) & CNDARM & CNDARG, 'YYYYMMDD'), 'DD-MM-YYYY')

2.

dates (makedate (CNDARS & if(len(CNDARA) = 1,'0'&CNDARA,CNDARA) , CNDARM , CNDARG) 'YYYYMMDD'), 'DD-MM-YYYY')


Regards,

Mukesh Chaudhari

maxgro
MVP
MVP

=date(makedate(20*100+12,1,17), 'DD-MM-YYYY')

with fields

date(makedate(CNDARS*100+CNDARA, CNDARM,  CNDARG), 'DD-MM-YYYY') as [DATA FATTURA]