Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have Date field which contains the values like 2013-Nov-44, 2013-Nov-45, 2013-Nov-46 and so on. Here 44,45 and 46 are the weeknumber.
Can someone please help me out to sort this.
Hi,
Try this sample Script
Raw_Data:
LOAD * Inline
[Sample_Date
2013/11/03
2013/11/06
2013/11/22
];
Data:
LOAD Year ( date# ( Sample_Date, 'YYYY/MM/DD' ) ) As years,
Month ( date# ( Sample_Date,'YYYY/MM/DD' ) ) as months,
Week ( date# ( Sample_Date, 'YYYY/MM/DD' ) ) as weeks
Resident Raw_Data;
Final_Data:
Load Dual ( years & '-' & months & '-' & weeks, weeks ) as Result
Resident Data
Order by weeks;
Drop Tables Raw_Data , Data
Hope It helps You.
Regards,
Ravikant
See this sample
Hi,
Create a Date field in Number format at script level and in SORT tab choose the Expression option call this field in Expression.
Example : currently you are having in this format 2013-Nov-44. please convert into this format 20131144 and then give this field in front end.
for example Date field name is TRANSACTIONDATE please right the below script to convert in number format and store it in new field.
Year(TRANSACTIONDATE)&num(Month(TRANSACTIONDATE ))&Week(TRANSACTIONDATE) As TRANSACTIONDATE _NUM and then call this in front end.
Regards,
Santhosh G