10-12-2007 05:18 AM - edited 03-14-2019 01:24 AM
I am trying to use expression editor to change string in time format(10:10:00) to the actual time format (T[10:10:00]). The syntax is Time.valueOf(string)but I keep getting errors.
Thanks,
Solved! Go to Solution.
10-15-2007 06:35 AM
I was able to get this to work in the script editor as follows:
Create one String Variable called StringTime & make the default value "10:10:00 AM". Next
create one Time Variable called RealTime
Using the "Set" Step click on "properties". In the first drop down box select the variable RealTime. In the second drop down box click on ... to launch the Expressions Editor.
When the Expressions Editor launches, type the following:
RealTime.valueOf(StringTime)
Click OK. Then OK again.
The Set step should look like:
RealTime = RealTime.valueOf(StringTime)
Also make sure your string value designates either AM or PM such as "10:10:00 AM"
Hope this helps. Please rate all posts!!
10-15-2007 06:35 AM
I was able to get this to work in the script editor as follows:
Create one String Variable called StringTime & make the default value "10:10:00 AM". Next
create one Time Variable called RealTime
Using the "Set" Step click on "properties". In the first drop down box select the variable RealTime. In the second drop down box click on ... to launch the Expressions Editor.
When the Expressions Editor launches, type the following:
RealTime.valueOf(StringTime)
Click OK. Then OK again.
The Set step should look like:
RealTime = RealTime.valueOf(StringTime)
Also make sure your string value designates either AM or PM such as "10:10:00 AM"
Hope this helps. Please rate all posts!!
03-05-2010 12:05 PM
hi
When I try this I get the following error
"For input String ; 0 AM nested exception is
Java.langNumber Format exception
My String value is 14:00:15 AM
03-05-2010 12:53 PM
Wow, this thread is 3 years old....nice find.
Were you not satisfied with the people helping you in your original thread?
11-11-2022 06:48 PM
I feel like I'm missing something... What should the value of "RealTime" be?
I've configured it per your post but am also getting an error.
03-27-2023 10:05 AM
hi,
You have received some additional response, resolved that error message, the same thing happens to me as to you, but in my case I am not directly using the mentioned expression, since I do not see it available in the uccx 12.5.1 editor
RealTime.valueOf(StringTime)
The one I am using is the following:
Time.valueOf(StringTime)
but i get the same error as you mention.
04-03-2023 07:26 AM
@Dennis Fogler @Uriah Erter @Anthony Holloway @shongunisys
hi,
I am having the same problem described in this conversation, but I am in a cuccx 12.5.1 su1 editor, and the step or syntax that I am trying to use to convert the data or variable content is the following:
RealTime.valueOf(StringTime) *** It does not appear available in the construction or edition of variables
The one I am using is the following:
Time.valueOf(StringTime)
but I get the following error just like someone else here
help!! support to solve and understand this inconvenience. !!!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide