cancel
Showing results for 
Search instead for 
Did you mean: 

Date + Time dilemma

RobertWashingto
Level 2
Hello,

I'm still learning so this may be a simple question.

I need to get the current date and time in my process..  I have used the function Now() which brings back date and time but due to daylight savings the time is an hour out.

I then used Today () and LocalTime () which brings back the correct date and the correct time but they are sitting in separate Data Items.  My questions are:

1. Is there a way of combining the date datatype and time datatype to make a datetime datatype?

2. Is there a way of changing the returned data from LocalTime() to the 24hr clock format?

Help always appreciated


------------------------------
Rob
------------------------------
1 BEST ANSWER

Best Answers

Hi Rob,

Can you provide some broader context on what you are trying to do?  Blue Prism displays dates and times according to the local settings of the user, but internally datetime items are stored and transferred in UTC to avoid time zone conflicts.

Check out the actions available in the Date and Time Manipulation utility object, such as Get Time of Day, UTC to Local, and Local to UTC.

For a deeper dive, see the Date and Time Handling data sheet.

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

View answer in original post

3 REPLIES 3

Hi Rob,

Can you provide some broader context on what you are trying to do?  Blue Prism displays dates and times according to the local settings of the user, but internally datetime items are stored and transferred in UTC to avoid time zone conflicts.

Check out the actions available in the Date and Time Manipulation utility object, such as Get Time of Day, UTC to Local, and Local to UTC.

For a deeper dive, see the Date and Time Handling data sheet.

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

KirtiMaanTalwa1
Level 3
HI Robert,

Hope you are doing good.

PFB answers to your questions -

1. Is there a way of combining the date datatype and time datatype to make a datetime datatype?

Sol - Yes, You can combine the date datatype, use below expression in calculation stage to make a datetime datatype -
ToDateTime(Today()&" "&LocalTime())

2. Is there a way of changing the returned data from LocalTime() to the 24hr clock format?

Sol - You can use below expression -
FormatDateTime(Today()&" "&LocalTime(), "dd/mm/yyyy HH:mm:ss")

------------------------------
KirtiMaan Talwar
------------------------------

Thanks this was a great help!

Regards Rob

------------------------------
Robert Washington
------------------------------