Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I am using below code to get 2 digit for year :-
Right(year(date),2) as [year_],
I am not able to sort the year in sequences from hi to lo
Any work around ?
PAul
why dont you use right(year(date),2) as Year
In the sort tab->Expression
=Year
Paul
You can create a dual for this, and sort it numerically, like this.
Dual(Right(Year(date), 2), YearStart(date))
HTH
Jonathan
Hi tres
I add sort expression as you said. but still not sort as my wish.
Once you sort it by 'Year' field , it works like expected .
My Advice would be rather than writing a big "IF" expression in the front end (In the list Year list box), it would be great if would get this done from the Backend Script to have a better performance .
Regards,
Karthick V
I see it fine !
Mr. Paul,
I know this post closed already. Just want to add new idea with below script for simple function and better performance
Date(YearStart([DateField]),'YY') AS [Years]
Above function will sort order automatically.
Regards,
Sokkorn
Hi All
Many thank. Now i found more then 3 people provide the right solution. I must said Jona get it right first.
yes your also correct.