Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have expression
WeekStart(date(oDate))& '-' &WeekEnd(date(oDate)) as WEEK result looks like 01/01/2012 - 01/07/2012, etc.
I need to sort varaible WEEK.
How can I do it?
Thanks in advance,
dual(WeekStart(date(oDate))& '-' &WeekEnd(date(oDate)),WeekEnd(date(oDate)) ) as WEEK
I put ) in right place
Try the dual function to create a field with both a textual and a numeric value. That way you can sort it numerically.
dual(WeekStart(date(oDate))& '-' &WeekEnd(date(oDate),WeekEnd(date(oDate))) as WEEK
HI
Try like this
dual(WeekStart(date(oDate))& '-' &WeekEnd(date(oDate),WeekStart(date(oDate))) as WEEK
Edit:
Can you post a sample file? if its not satisfy
I like both your answers
I don't understand how works dual function.
this my expression WeekStart(date(oDate))& '-' &WeekEnd(date(oDate)) as WEEK, which gives me WEEK varible. (it's string) I can sort only by text. I need to create something to match it with number.
when I use your expression, i get error dual takes 2 parameters.
what's the second parameter should I use?
Cheers
Thank,
I got it.
dual(WeekStart(date(oDate))& '-' &WeekEnd(date(oDate)),WeekEnd(date(oDate)) ) as WEEK
I put ) in right place