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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Toya2323
Contributor
Contributor

Add leading zeros and replace

Replace, need leading zeros

I have

Load;

Text('ID')                                                                   as ID,

Timestamp(`date`,'MM/DD/YYYY')    as "Order date"

From _________________;

 

 

Output:

ID                                 Order date

500001238               11/01/2018

0500001238            11/02/2018

000008734               11/01/2018

100007738              11/01/2018

0100007738            11/02/2018

0100007738_dd    11/02/2018

 

I needed it to look like this :

ID                                 Order date

0500001238               1/01/2018

0500001238            11/02/2018

000008734               11/01/2018

0100007738             11/01/2018

0100007738            11/02/2018

0100007738_dd    11/02/2018

 

How do I replace 500001238 with 0500001238, 100007738 with 0100007738  keep the same order dates and not affect the two other rows?

Labels (1)
1 Reply