Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
You can try like below:
Timestamp#(Replace(subfield(text(timestampfield),'.',1),'T',' '),'YYYYMMDD hhmmss')
Hi,
Its getting the value.. But i need help with the below attachment to show only latest record based on region...
Sub2u444
Try like below:
Source:
LOAD
*,
Timestamp(Timestamp#(Replace(subfield(text(timestampfield),'.',1),'T',' '),'YYYYMMDD hhmmss')) as new_ts
From file;
Inner Join,
Load
TaskName,
Timestamp(Max(new_ts)) as new_ts
Resident Source
Group by TaskName
;
Check here also..
See if attached can help -
Load *,
num#(Timestamp#(Date + Time)) as FinalTimestamp;
Load *,
Date(date#(SubField(Timestamp,'T',1),'YYYYMMDD'),'DDMMYYYY') as Date,
maketime(Mid(Timestamp,10,2),Mid(Timestamp,12,2),Mid(Timestamp,14,6)) as Time;
Load * inline [
Timestamp, Region
20160223T090024.495-0800, Japan
20160223T110023.494-0800, Japan
20160223T130026.273-0800, Japan
20160223T150028.306-0800, Japan
];