Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good Day,
I have TXT.FILES naming
TESTJUNE2012.TXT
TESTAUGUST.TXT
TESTJULY 2012.TXT
anyone can give me a example how do i convert it into a DATE?
THANKS.
You may work with kind of mapping table:
[code]map_Dates: MAPPING LOAD * INLINE [FileName, Date
JANUARY, 1/1/2012
FEBRUARY,1/2/2012
MARCH, 1/3/2012
...];
LOAD
*,
APPLYMAP('mapDates', TRIM(REPLACE(REPLACE(REPLACE(FILENAME(), 'TEST', ''), '.TXT', ''), '2012', '')) AS Date
FROM
...;
[/code]
HTHPeter