Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter by date in script

Hi,

I need to load a excel file via load script, by filtering by a date field, i.e. Fecha > "01-05-2014 00:00:00".

I don't know how filter data neither how manage this date format

Any help?

Thanks in advance

1 Solution

Accepted Solutions
ashfaq_haseeb
Champion III
Champion III

Hi

You may try

load *

From <excel fie>

where Fecha > 01-05-2014 00:00:00


If possible try to post your sample here. to get faster reply.

Regards

ASHFAQ

View solution in original post

5 Replies
ashfaq_haseeb
Champion III
Champion III

Hi

You may try

load *

From <excel fie>

where Fecha > 01-05-2014 00:00:00


If possible try to post your sample here. to get faster reply.

Regards

ASHFAQ

Anonymous
Not applicable
Author

Date "likes" to be in the single quotes:

where Fecha > '01-05-2014 00:00:00'

Not applicable
Author

Thanks a lot!!!

Not applicable
Author

Thanks a lot!!!

murugesh
Contributor II
Contributor II

Can you help me out where i want to set date filter

 

Case1:
Select Id,
Case_Type__c,
LastModifiedDate,
CreatedDate,
Origin,
Status,
Subject from Case where Date(CreatedDate,'DD-MM-YYYY')>='01-05-2018';

CaseHistory1:
Select Id,
CaseId,
CreatedDate,
Field,
NewValue from CaseHistory where Date(CreatedDate,'DD-MM-YYYY')>='01-05-2018';

CaseTemp:
Load
Id,
Case_Type__c,
LastModifiedDate,
Origin,
Status,
CreatedDate as CaseCreatedDate
Resident Case1
;


CaseHistoryTemp:
Load
Id as CaseHistoryId,
CaseId as Id,
Field,
NewValue,
CreatedDate as CaseHistoryCreatedDate
Resident CaseHistory1
;

 

TemporaryTable:
Load
Id,
CaseCreatedDate as IntialDate
Resident
CaseTemp;

join (TemporaryTable)

Load
Id,
max(CaseHistoryCreatedDate) as FinalDate
Resident
CaseHistoryTemp
Where
Field = 'Subject'
and Match (NewValue,'URL LINK SENT', 'CSV FILE SENT', 'SELF INSTALLER', 'INSTALLER ACCEPTED')
Group By
Id
;

NWDData:
Load
Id,
NetWorkDays(IntialDate, FinalDate) as NWD
Resident
TemporaryTable
;
Drop Table TemporaryTable;