Hi Team, i Hope all doing good there!.
I have a time variable Vstarttime output is 01:00 i want to add 46mins to the starttime sting with UiPath
Hi Team, i Hope all doing good there!.
I have a time variable Vstarttime output is 01:00 i want to add 46mins to the starttime sting with UiPath
Hi
Hope the below expression would help you resolve this
stroutput = Datetime.ParseExact(Strinput.ToString.Trim, “hh:mm”, System.Globalization.CultureInfo.InvariantCulture).AddMinutes(46).ToString(“hh:mm”)
Cheers @rahul_gola
you can do the suggestion from Palaniyappan
you can also try this:
Vstarttime.add(New System.Timespan(0,0,46,0))
here Vstarttime is of type TimeSpan
@Palaniyappan, Thank you for quick response. but the above is not working i am not getting ParseExact
its a string, is that is why i am not able to identify as time.
i am reading a json file and getting start time from there. but when i am tryin gthe above expression its not working
it says ParseExact is not a member of string
@lakshman @Palaniyappan vstartTime = TestObject(“data”)(“@StartTime”).ToString
output is 00:16
now i want to add 46 mins to it
stringinput is ok i will pass it but same error
same error as the above
Try below expression.
CDate(TestObject(“data”)("@StartTime").ToString).AddMinutes(46).ToString("HH:mm")
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.