cancel
Showing results for 
Search instead for 
Did you mean: 

Time Conversion Error - AM / 24h

JuliaDziedziul1
Level 2
Dear Community,

I am having a problem with time conversion.

  • Input Parameter for process in Scheduler: 13:00 As Time
  • Then it is added to one of the items in the queue, example: DateName 13:00 is the item key
  • For 2 months it was working fine - so DataName 13:00 was placed in the queue
  • During the weekend robot added the item, but instead 13:00 -> 1:00 PM.
The datetime format settings for Windows are still the same as they were before.

Could you please advise what caused that conversion and how to avoid it (still having input time stored as time)?

------------------------------
Julia Dziedziul-Gorska
------------------------------
1 BEST ANSWER

Helpful Answers

That's pretty weird. But I think there are two ways you could handle it, the first of which is likely the better way.

1. You could use the FormatDateTime() function like this in your Expression:

FormatDateTime([Hour To], "HH:mm")

Then, valid values would be like "13:00" or "1:00 PM", both of which would result in the value "13:00".

2. You could change the input to be Text and then just do a validation on the inputted values but then use values in [Hour To] without any kind of conversion to ensure the exact values are used.

------------------------------
Dave Morris
Cano Ai
Atlanta, GA
------------------------------

Dave Morris, 3Ci at Southern Company

View answer in original post

4 REPLIES 4

Hi Julia,

Where is the input parameter coming from and how are you adding it to the queue? It could be from the settings of another machine or the process itself.

------------------------------
Patrick Aucoin
Senior Product Consultant
Blue Prism
------------------------------

Hi Patrick,

The Input Parameters are from scheduler.

Process was firstly run from scheduler and after failure (machine was logged out) process was re-run with the same parameters from the same machine.
And as seen on the screenshot (Created between 9:20 and 9:40) - those 2 items have different time conversion.

I would be really grateful if you could advise what could be the cause of it.

17639.png




------------------------------
Julia Dziedziul-Gorska
------------------------------

That's pretty weird. But I think there are two ways you could handle it, the first of which is likely the better way.

1. You could use the FormatDateTime() function like this in your Expression:

FormatDateTime([Hour To], "HH:mm")

Then, valid values would be like "13:00" or "1:00 PM", both of which would result in the value "13:00".

2. You could change the input to be Text and then just do a validation on the inputted values but then use values in [Hour To] without any kind of conversion to ensure the exact values are used.

------------------------------
Dave Morris
Cano Ai
Atlanta, GA
------------------------------

Dave Morris, 3Ci at Southern Company

Hi Dave,

Yes, that was pretty weird.

I already implemented time conversion yesterday as it was urgent 🙂 -  but thank you so much for your solutions.
As I am also responsible for other BP Robots just wanted to know the root cause - to know how to react and what can be improved without rebuilding potentially all robots using time input.

Maybe you have some ideas?

------------------------------
Julia Dziedziul-Gorska
------------------------------