PDF - Timestamp Adding a second

Ipexian

New Member
Hello Everyone,

Terrific forum so glad I came across it.

I have a question. I am reading a time stamp from a PDF document and have it saved as a Variable. The time reads as 09:30:00, however I need to add a +1 to the end making it 09:30:01.

Each time the time could be different but I will always need to add the +1 to the end of that time format.

Is anyone aware if this is possible or how I could go about it.

The PDF is the file it will always use I can change this as it pulls from an internal website and is set up to produce a PDF.

Thank you heaps in advance
 

VJR

Well-Known Member
Hi Ipexian,

If you are looking for something ready made then there is a Metabot provided by Automation Anywhere that provides features around date and time.

If you go to the below link then in the Features section it has mentioned of having a provision to Add Seconds which you can make use of.
https://botstore.automationanywhere.com/bot/change-date-and-time-format/

I believe this can be downloadable for a registered user with appropriate license. If you are working for an organization then I'm sure you would already be authorized to do so, but if you are working on a trial version with some individual Id then I am not sure if it may allow. You can try out and see in case you are a individual user.

If you are unable to download then as a workaround I can think of now that the last two digits of 09:30:00 can be retrieved into a variable using Substring function. Then add 1 to the variable. Need to ensure that if it is a single digit time then prefix the zero eg; 00 + 1 returns 1 so you need to make it 01. Nothing to do for 10 to 59.
Then in another substring when you get the first six characters of 09:30: you can concatenate the 01 to it, forming the final variable as 09:30:01. Maybe there is a better way and you can post here if you come up with something or if you are able to download the bot then suggest the forum a good logic to do so.
 

Ipexian

New Member
VJR,

Wow thank you so much. I will have to look into the Metabot option I have been told by organisation that Metabots are viewed as hardcode for us and would not support these features, but that looks like a great way of doing this. I will def look into this thank you.

If I cant use Metabot then I think your workaround will work great.

Thank you so much. If I find out something or a workaround I will post here, always good to share the knowledge
 

VJR

Well-Known Member
VJR,

Wow thank you so much. I will have to look into the Metabot option I have been told by organisation that Metabots are viewed as hardcode for us and would not support these features, but that looks like a great way of doing this. I will def look into this thank you.

If I cant use Metabot then I think your workaround will work great.

Thank you so much. If I find out something or a workaround I will post here, always good to share the knowledge
You're welcome.
 
Top