Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
We have a weird scenario where in one field they have entered the date as well as some text alone with date. Example:-
Current Date
8/8/2016
9/8/2016
Request on 10/08/2016
Request on 11/08/2016
appreciate your ideas and tricks on the give scenario.
You can use
KeepChar(Current Date,'0123456789/')
try this
purge:
LOAD * INLINE [
Current Date
8/8/2016
9/8/2016
Request on 10/08/2016
Request on 11/08/201
];
LOAD KeepChar ([Current Date],'1234567890/') as new
Resident purge;
try same
purge:
LOAD * INLINE [
Current Date
8/8/2016
9/8/2016
Request on 10/08/2016
Request on 11/08/201
];
LOAD PurgeChar ([Current Date],'abcdefghijklmnopqRstuvwxyz') as new
Resident purge;
You can do this way also
Data:
LOAD * Inline
[
Current Date
8/8/2016
9/8/2016
Request on 10/08/2016
Request on 11/08/2016
];
New:
LOAD
*,Right([Current Date],10) as NewDate
Resident Data;
Regards,
Anand
Also you can create the correct date format for the fieldNewDate
Date#( Right([Current Date],10),'MM/DD/YYYY') as NewDate
Regards
Anand
Thank you all for your prompt reply. It seems the keep char is most preferred than purge char but both is good workaround.Thanks for quick reply.
nice please close this thread by making helpful/correct answers