Get text removing space

Hi am trying to get date and time from 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
Split(“6/08/20221:27pm”,now.year.ToString)(0).ToString+now.year.ToString+" "+Split(“6/08/20221:27pm”,now.year.ToString)(1).ToString

Pass Date Variable Instead of Date.


Hi @Rilna_Rilna
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.

Thank you

Hello @Rilna_Rilna

suppose if you are getting the value to a variable “strVal”

strVal.Split(now.toString(“M/dd/yyyy”)[1] 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”)[1]

you can also use split as "Split(strVal,now.toString(“M/dd/yyyy”)[1]

Hi @Rilna_Rilna,

Many solutions have been offered. I also added. I hope that will be useful.

value= “06/08/20221:27”

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.