Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Zurich on Sept 24th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
suvbin
Creator III
Creator III

Replacing default value to user defined value

How to replace the default value  00000000   to  some date value like  01/02/2020.   I have few date columns,  in the source side the default value is kept as  0000000  to them. if i want to change the the default value to some date value, then how to do it using expression builder. 

 
Labels (1)
2 Solutions

Accepted Solutions
AlexeySosnovskih
Partner - Contributor III
Partner - Contributor III

replace($name,'00000000',strftime('%Y/%m/%d','now'))

View solution in original post

Madhavi_Konda
Support
Support

case when $DATE_TEST='00000000' then '01/01/2020' else $DATE_TEST end  you can use this expression as well.

And also as Alexey suggested replace($DATE_TEST,'00000000','01/01/2020')

Thanks,

Madhavi

View solution in original post

6 Replies
AlexeySosnovskih
Partner - Contributor III
Partner - Contributor III

replace($name,'00000000',strftime('%Y/%m/%d','now'))

suvbin
Creator III
Creator III
Author

Thank you for the update.   if i want to put only this value  "01/02/1900" then ...   ? And also if i want to  replace more than on e column ...  ? how to do that 

replace($name,'00000000',strftime('%Y/%m/%d','now'))   --  > this will replace with the current date ?

Madhavi_Konda
Support
Support

case when $DATE_TEST='00000000' then '01/01/2020' else $DATE_TEST end  you can use this expression as well.

And also as Alexey suggested replace($DATE_TEST,'00000000','01/01/2020')

Thanks,

Madhavi

suvbin
Creator III
Creator III
Author

 Ok for each column i need to open expression builder seperately and then give this transformation.

Madhavi_Konda
Support
Support

Yes.

suvbin
Creator III
Creator III
Author

Thank you Alexey , Thank you Madhavi.