Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
An excel contains a column with values in date format. I wish to check whether the values which are present in the excel file match a particular format of 'DD-MMM-YY'. A new column DateCheck should be created which stores the result. If the column has values in the desired format, then the new column DateCheck would have values as 'Y' else it should have 'N'.
Thanks,
Asma
May be like this:
If(yourDate = Date(yourDate, 'DD-MMM-YY'), 'Y', 'N') as DateCheck
Note: I have not tested this and I am not entirely sure if this would work or not.
Best,
Sunny
.... or something like :
if ( alt ( date#( '22-MAR-15' , 'DD-MMM-YY' ) , 0 ) > 0 , 'Y' , 'N' ) as DateCheck ,
Hi,
maybe this solution could be extended like this
LOAD somefields,
If(IsNum(Date#(excelfield, 'DD-MMM-YY')), Dual('Y',1), Dual('N',0)) as DateCheck
FROM yourexcelfile;
in order to be able to use the DateCheck field as logical value like
If(DateCheck, dothis, dothat)
hope this helps
regards
Marco