Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear expert
I am new to Qlikview
in my data base I have a field for dates and the format is dd/mm/yy
now using script i want to crate a column for month separate and year separate
So please tell me how we can do it
Faisal
Maybe like this:
Set DateFormat = 'DD/MM/YY';
LOAD
...
DateField,
year(DateField) as Year,
month(DateField) as Month,
Date(monthstart(DateField),'YYYY-MMM') as Monthstart,
...
from YOURTABLE;
Hi thank you for the fast reply
but still i am not able to get the answer
so please see the script i written
------------
LOAD * Inline
[
Invoice Date,
year(Invoice Date) as Year,
month(Invoice Date) as Month,
]
--------------
please tell me wether i was written correct?
Faisal
Hi thank you for the fast reply
but still I am not able to get the answer
so please see the script i written
------------
LOAD * Inline
[
Invoice Date,
year(Invoice Date) as Year,
month(Invoice Date) as Month,
]
--------------
please tell me wether I was written correct?
Faisal
Do you want to load from a DB / file or state the values as INLINE table? If latter, I think the actually values are missing and you should use the QV functions in the actual load statement, like
LOAD
[Invoice Date],
year([Invoice Date]) as Year,
Month([Invoice Date]) as Month
INLINE [
Invoice Date
30/01/12
01/01/12
15/12/11
28/02/10
07/07/09
];
Hi friend...
Above you have mentioned the value in inline table.
You have to first make the entry in your inline table.
ie'
Invoice:
load * inline [
invoicedate
26/01/2012
27/01/2012
29/01/2012
than you can use the resident of above table
Final:
load invoicedate,
year([Invoice Date]) as InvoiceYear,
Month([Invoice Date]) as Invoicemonth
resident Invoice;
drop table Invoice;
thanks and regards
Kamal