Hi, I have attained the string “27/07/20” from a pdf and would like to put that int excel to subtract some days from it, but i found out that in the excel it is not detecting this format. So i decided to change it to a date time date, but i realized that this string could not be recognize as a date time format. Is there any simple solution for this?
@Srini84
thank you for the reply, but the data ive attained already has the slashes and the solution that you posted seem to be for when the string doesnt have the slashes. Thank you anyways. Maybe i can remove the slashes and use your method instead or maybe you have a better suggestion.
“27/07/20” this was the sting that i got. thank you
im also currently using the CDate(date_variable).Tostring(“dd/MM/yyyy”) method
You can try as below
- sample = sample.Replace(“/”)
2)sample = sample.Substring(2,2) + “/” + sample.Substring(0,2) + “/” + sample.Substring(4,2)
3)sample = convert.ToDateTime(sample).ToString(“dd/MM/yyyy”)
Mark as solution if this works
Thanks
Hi @eric_wai
Below is the workflow i have made previously for the same issue
Hope this may help to solve your issue
Mark as solution if this helps you and like it
Happy Automation
Best Regards
Er Pratik Wavhal
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.