Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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, ...
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
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;
Yep Martina ! I forgot hh:mm:ss.
Thanks for your time
JJ