Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys ,
i am facing problem in writing a logic as i am new to qlikview to check if the field imported from excel is a date or a text in date format then create a new column =y else new column =n .
Appreciate your help.
if the dates are in consistent format. you could try soemthing like below
If(IsNum(Date#(DateField,'dd/mm/yyyy')),'yes','no') as IsDate
if Datefield is 'adb' it will store no
if it is 21/11/2020 it will store yes
thanks for the reply.
but this formula doesn't work on the below data
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
Not Required for FSPO Treatment |
04/09/2020 |
In this case I would recommend just doing a check if the first character is numeric or alpha and proceed from there...
The following Help link may put you on the right track, sort of from where the prior post was coming I believe:
Regards,
Brett
Try like this.
tab1:
LOAD RowNo() As RowID,*, If(Text Like '*??/??/??*','Y','N') As Flag;
LOAD * INLINE [
Text
Not Required for FSPO Treatment
Not Required for FSPO Treatment
Not Required for FSPO Treatment
Not Required for FSPO Treatment
Not Required for FSPO Treatment
Not Required for FSPO Treatment
04/09/2020
];
Output.