Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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
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
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