Hi,
I am working on a exercise where I need to fetch data from a .csv file and fill it in an online form. The problem is that, the fetched data consists of DOB as 9/05/1965 (dd/mm/yyyy) and the websites requires it to be filled as 09/05/1965. Can anyone please suggest me how to add ‘0’ in the front if the value day is one digit only. Thanks
Hi @suwalruchan365,
You can acheive this by using some date functions. Please try yourself.
Alternatively , you can add ‘0’ at the begining of DOB using string concatenation
Revert if you still need more clarification. But I suggest you to try on your own.
Best Regards,
SP
Try DateTime.parseExact(ExcelDate,“d-M-yyyy”,nothing).ToString(“dd-MM-yyyy”)