cancel
Showing results for 
Search instead for 
Did you mean: 

Expression to add the leading zeros in date if not already exisit

Miya
Level 5
Hi ,

 I have to get the date as 02 even if the date appear as 2 or it appears as 02 , so that when i extract the files it should take it as 02, please can someone get the expression for this.

------------------------------
Miya
------------------------------
3 REPLIES 3

mkumar407
Level 7
hi Miya,

Please use Date --> FormatDate Function in calculation stage:
14305.png

------------------------------
Manish Kumar
------------------------------

VedSengupta
Level 6

Hi Miya,
If you are extracting data from a flat file then is the format of the cell as text?

I have seen it happening myself. When I extract data from Excel for a attribute time and if it is not in text format the value appears as a decimated one.
What I do is format the cell to text and then load it into collection. 



------------------------------
------------------------------
Best Regards,
Ved Sengupta
RPA Developer
Bangalore | INDIA
------------------------------
------------------------------
------------------------------ Best Regards, Ved Sengupta RPA Developer Deloitte India (Offices of the US) Bangalore | INDIA *If you find this post helpful mark it as best answer* ------------------------------

EVIPUTI
MVP
Yes simply use format date function . It will automatically append a zero if its its 1 digit number .
FormatDate("9/30/2020","dd.MM.yyyy"), --> result (30.09.2020)

------------------------------
------------------------------
Vipul Tiwari
Senior Process Simplification and Optimization Designer(Solutions Architect)
Fidelity International
------------------------------
------------------------------
------------------------------ Vipul Tiwari Senior Process Simplification Developer Amazon ------------------------------