Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need Help New to qlikview

Hello everyone,

I need help with my script-I want to view the date as month, year, and day.

Here is my script:

[Event Date],

[Event Type],

     Location,

when I write:

Year (Event Date) AS Year,

Month (Event Date) AS Month,

Day (Event Date) AS Day,

it gives me an error. I may be making a small mistake can you write out how i am suppose to write it and exactly where to enter it.

Thank you!

Labels (1)
3 Replies
deepakk
Partner - Specialist III
Partner - Specialist III

hi,

You have to put Event Date inside the bracket []

like

Year ([Event Date]) AS Year,

Month ([Event Date]) AS Month,

Day ([Event Date]) AS Day,

I hope this helps

Deepak

Not applicable
Author

Deepak is absolutely correct, any fields with spaces in the name should be referred to with left and right brackets [].

You can also reformat your dates on the numbering tab properties after they've been brought into your QlikView document. For example if you wanted to change MM-DD-YYYY, to just YYYY - this will only render out the year. You can do the same with MM and DD.

-Anthony

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Reformatting will not actually group the values, it will just change the display format. If you have two values:

1/1/2012

1/3/2012

Set the format to "YYYY'. Put them in a listbox and you will see 2012 listed twice. Probably not what you want. You have to use the Year() function to extract the year and change the underlying value.

-Rob