Time and Timespan types
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-07-21 03:01 PM
Hello team,
I am new to Blue prism and exploring data types. I have created process which accepts variable of type Time and Timespan and writing these two values in File. I exposed this process and invoking it via Java code.
For Time variable , when I passed value in "HH:MM:SS" format process removes second value in file.
eg : I passed "16:10:10" then output in file is 4:10 PM. Why second value is not persisting in file?
In case of Timespan I passed value in "Day.HH:MM:SS" format then value written in file is completely different.
eg : I passed "02.03:04:05" then value in file is "0.00:00:02". Looks like I am missing something in case of Timespan.
Can anyone tell me which are standard formats to pass to variables of type Time and Timespan from external code.
Thanks in advance.
------------------------------
Amit Mane
------------------------------
I am new to Blue prism and exploring data types. I have created process which accepts variable of type Time and Timespan and writing these two values in File. I exposed this process and invoking it via Java code.
For Time variable , when I passed value in "HH:MM:SS" format process removes second value in file.
eg : I passed "16:10:10" then output in file is 4:10 PM. Why second value is not persisting in file?
In case of Timespan I passed value in "Day.HH:MM:SS" format then value written in file is completely different.
eg : I passed "02.03:04:05" then value in file is "0.00:00:02". Looks like I am missing something in case of Timespan.
Can anyone tell me which are standard formats to pass to variables of type Time and Timespan from external code.
Thanks in advance.
------------------------------
Amit Mane
------------------------------
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-07-21 03:44 PM
Hi @AmitMane,
I believe your time is being written to the file based on your system Short Time format for your locale. You can probably override this by using the FormatDateTime function within a Calculation stage to create the specific format you want to output.
Cheers,
------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------
I believe your time is being written to the file based on your system Short Time format for your locale. You can probably override this by using the FormatDateTime function within a Calculation stage to create the specific format you want to output.
Cheers,
------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-07-21 04:23 PM
Thanks Eric for your inputs.
Do you have any suggestion for Timespan format issue?
------------------------------
Amit Mane
------------------------------
Do you have any suggestion for Timespan format issue?
------------------------------
Amit Mane
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
20-07-21 03:31 AM
I'm a little confused by the TimeSpan one. What locale is your machine set for? Are you using the Utility - File Management VBO to write out to your log file?
Cheers,
------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------
Cheers,
------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
20-07-21 07:49 AM
Hi Eric,
For Time type, I have checked system's Short Time format it's "h:mm tt". So as you mentioned I tried to use "FormatDateTime" function. But I couldn't figured out how to pass variable of type "Time" to this function. It will be great if you give me example,
Regarding Timespan local is "English (United States)" and I am using "Utility - File Management VBO" to log both Time and Timespan variables.
------------------------------
Amit Mane
------------------------------
For Time type, I have checked system's Short Time format it's "h:mm tt". So as you mentioned I tried to use "FormatDateTime" function. But I couldn't figured out how to pass variable of type "Time" to this function. It will be great if you give me example,
Regarding Timespan local is "English (United States)" and I am using "Utility - File Management VBO" to log both Time and Timespan variables.
------------------------------
Amit Mane
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-09-21 06:31 PM
Just try to search for zeros in the Timespan and remove it, and make sure to find at which position it found zeros, based on this you can decide whether it is days/hours/minutes/seconds.
For example:
Time Span = 0:00:09:18 ..In the above scenario, zero is found at position 1 means it is zero day. and second zero is at position 7 ignore it. (you should consider only 1,3,6,9) and so on.
------------------------------
------------------------------
Vipul Tiwari
Senior Process Simplification and Optimization Designer(Solutions Architect)
Fidelity International
------------------------------
------------------------------
For example:
Time Span = 0:00:09:18 ..In the above scenario, zero is found at position 1 means it is zero day. and second zero is at position 7 ignore it. (you should consider only 1,3,6,9) and so on.
------------------------------
------------------------------
Vipul Tiwari
Senior Process Simplification and Optimization Designer(Solutions Architect)
Fidelity International
------------------------------
------------------------------
------------------------------
Vipul Tiwari
Senior Process Simplification Developer
Amazon
------------------------------
