Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
victor_greffet
Partner - Contributor III
Partner - Contributor III

Fill empty date field

Hi community,

I have an Excel Data base and I loaded different column. In order to have the date format in my app, I used the date function , but at the same time I wanted to fill empty cells with 'empty'. I have this script (exemple for one column):


DATA :


Load

date(if(len(trim([Target Date]))=0,'empty',    [Target Date])) as     [Target_Date] ,

...


From Excel file.xlsm


But after storing DATA, I realized that I only have dates and nothing when the cell is empty. It works if I remove the function date() but my dates are like numbers


do you have an idea ?



Thank you !

Victor



1 Solution

Accepted Solutions
sunny_talwar

Try this

Load

    If(Len(Trim([Target Date])) = 0, 'empty', Date([Target Date])) as [Target_Date] ,

...

From Excel file.xlsm

View solution in original post

3 Replies
antoniotiman
Master III
Master III

May be

Load

f(len(trim([Target Date]))=0,'empty',   Date( [Target Date]))) as     [Target_Date] ,

sunny_talwar

Try this

Load

    If(Len(Trim([Target Date])) = 0, 'empty', Date([Target Date])) as [Target_Date] ,

...

From Excel file.xlsm

victor_greffet
Partner - Contributor III
Partner - Contributor III
Author

It works,

You're awesome

Thank you !