Skip to main content
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 (2)
1 Reply