Hi am trying to get date and time from app.eg: 6/08/2022 1:27pm but the activity removes all the space like 6/08/20221:27pm. How can I get the original text. May be by splitting with current year.
Can you please try with Get Full Text activity and check it once.
Or Try Get Attribute Activity And Check Once.
Tried all. But nothing works. Can you please tell me the split expression with current year as delimiter.
Find Below Expression
Pass Date Variable Instead of Date.
If nothing is working you can use regex expression on the string first to get the date string and then time string.
for getting date string.
for getting time string
And then you join both string with space in between.
I hope it was helpful.
suppose if you are getting the value to a variable “strVal”
strVal.Split(now.toString(“M/dd/yyyy”) This will give you the time 1:27pm
if you want o append. then now.toString(“M/dd/yyyy”)+" "+strVal.Split(now.toString(“M/dd/yyyy”)
you can also use split as "Split(strVal,now.toString(“M/dd/yyyy”)
Many solutions have been offered. I also added. I hope that will be useful.
Convert.ToDateTime(Convert.ToDateTime(value.Substring(0,10)).ToString(“dd/MM/yyyy”) +" “+ value.Replace(value.Substring(0,10) ,”")).ToString(“dd.MM.yyyy hh:mm tt”)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.