Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Date issue

Sorry guys for this simple issue.

I have 2 txt file where the date fields have different format. Itlooks like

- 12/10/10 in the first one

- "2010/10/12 00:00:00" in the second

I'd like to concatenate both files with a unique date fields in 'DD/MM/YYYY' format.

How to achieve this ?

JJ

Tags (1)
4 Replies
brenner_martina
Valued Contributor II

AW:Date issue

Hi JJ,

you have to use the floor function:

First date: Load Date#(Datefield1,'DD/MM/YY') As DateKey, ...

Second date: Load Floor(Date#(Datefield2,'YYYY/MM/DD') As DateKey, ...

Not applicable

AW:Date issue

Hi Martina

Don't work !

Here a sample of my data(for the second)

"Code Entite comptable" "Date Comptable" "Nombre de lots"
"010040" "2010/10/11 00:00:00" "180"
"010040" "2010/10/12 00:00:00" "269"
"010040" "2010/10/13 00:00:00" "333"
"010040" "2010/10/14 00:00:00" "258"
"010040" "2010/10/15 00:00:00" "239"
"010040" "2010/10/16 00:00:00" "124"

Maybe another idea ?

JJ

brenner_martina
Valued Contributor II

AW:Re: AW:Date issue

Hi JJ,

This works:

Data:
LOAD * INLINE [
"Code Entite comptable", "Date Comptable", "Nombre de lots"
010040, 2010/10/11 00:00:00, 180
010040, 2010/10/12 00:00:00, 269
010040, 2010/10/13 00:00:00, 333
010040, 2010/10/14 00:00:00, 258
010040, 2010/10/15 00:00:00, 239
010040, 2010/10/16 00:00:00, 124
];

Left Join (Data)
Load *,
Floor(Date#("Date Comptable",'YYYY/MM/DD hh:mm:ss')) As DateNew
Resident Data;

Not applicable

AW:Re: AW:Date issue

Yep Martina ! I forgot hh:mm:ss.

Thanks for your time

JJ

Community Browser