Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi i have written below code. iam getting expression error with Lunar week.
LOAD
Year(`DATE`) as year,
Month(`DATE`) as month,
LunarWeek(`DATE`) as week;
FROM Total;
Can anyone help ??
You can try concatenate
LOAD Year(DATE) as year
Month(DATE) as month
Year(DATE) &'/'& Week(DATE) as week
FROM Total;
Hi,
The function is LunarWeekName or LunarWeekStart or LunarWeekEnd.
Hi Tonial
I tried the LunarWeekStart &LunarWeekName in my script, but iam not getting the correct values.
I got the values like this :
38169
38640
38647
38697
.
.
.
.
40445
Any suggestion ????
Many thanks
Those values are raw date formats - simply format them to dates (=date(Field)) - put '40445' in an Excel cell and then set the format to be a date...you get 24/09/2010.
Hope that helps,
Matt - Visual Analytics Ltd
Hi Matt
Thanks for your reply.
As you suggested, i have changed the format to date and i got values like this :
01/07/2004
15/04/2005
.
.
.
24/09/2010
But I want to see lunar week as numbers like 1,2....52.
when i wrote the script with week(date) as week, it's giving week values like 1,2....53, but when i used lunarweekname(date) as week, its giving values like 01/07/2004 etc., How can i change that format to numbers ????
HI,
I agree with Matt's response.
I tried and it worked well.
LunarWeekName ( '01/12/2011' ) Date Format is MM/DD/YYYY return 2011/02.
put your code here.
Here is my code:
LOAD Year(`DATE`) as year
Month(`DATE`) as month
LunarWeekName(`DATE`) as week ;
FROM Total;
As per suggestion, I have changed 'week' list box properties to---number---date ----DD/MM/YYYY, return values are 01/07/2004,15/05/2005 etc……but I want 1,2,3…52.
Many thanks
You Trys this, without quotes.
LOAD Year(DATE) as year
Month(DATE) as month
LunarWeekName(DATE) as week
FROM Total;
Hi Tonial
Tried without quotes, but still returning same values as mentioned above.
Any other solution please ??
Thanks
You can try concatenate
LOAD Year(DATE) as year
Month(DATE) as month
Year(DATE) &'/'& Week(DATE) as week
FROM Total;