I want to rename one folder with date and time. syntax of the folder is <ddmmyyyy)_<hhmmss). I am able to get the time but that's not in 24 Hrs format.Also i want to remove ":" from time.
You'd need to use the Replace function within a calculation stage to create a brand new name for your file, where the Replace function will be used to remove the colon symbol. Use double-quotes (as null) to replace the : symbol
Thanks anisjolly for reply. I have another query of converting time to 24 hrs format. I am able to get the current time but it's in AM/PM format. I want to convert it to 24 Hrs format.
You can achieve that by using a calculation stage and using the DateTime functions. You can use the help functions in Blue Prism to find the correct use of hh and HH. I'm sure HH is referencing 24 hour formatting.
I'd also recommend reading up on formatting date and time using VB / Excel to help you.
I believe the following will calculate the text that you want: "logs_" & FormatDateTime(Now(), "ddMMyyyy_HHmmss")
The return value of Now() may be in UTC or local time depending on your environment.
I'd recommend to use LocalTime() rather than Now() - as you'll find it's more accurate, and possibly saves issues with certain time related problems that are caused by server settings etc.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.