Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Date issue

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

5 Replies
MVP
MVP

Date issue

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;

Not applicable

Date issue

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

Not applicable

Re: Date issue

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

MVP
MVP

Date issue

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

];

kamalqlik
Valued Contributor

Date issue

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