You can translate the question and the replies:

How to add a trailing 0 to number

Hello, I have month and day in this format 1,2,3... how can I convert it to 01,02,03, ... Thank you
07-05-2021 09:35:06 -0400

2 Answers

Hi, I am able to format these values as desired by utilizing the String function leftpad(), available in the Denodo XtraFuncs for VDP Library. If you are a valid support user, you can download the Denodo Xtrafuncs for VDP from the Support Site under Downloads > DenodoConnects > Denodo XtraFuncs for VDP. Using this function, I can specify the desired ‘size’ of my outputs, and which character will be used to fill the difference. For Example: `SELECT leftpad('month_column', 2, 0) FROM 'table_name';` Will return a value of ‘1’ as ‘01’, ‘3’ as ‘03’, ‘11’ as ‘11’ and so on. Please refer to the [Denodo XtraFuncs - User Manual]( for more on the definition and usage of these functions. Hope this helps!
Denodo Team
 Edited on: 07-05-2021 12:30:23 -0400
Hello, Thank you very much for you answer.
13-05-2021 11:23:44 -0400
You must sign in to add an answer. If you do not have an account, you can register here