Any good way to format a string to include additional information such as its "type","format"?

For example I have a datetime (“2020-05-15”) stored inside a string and I would like to include the format and additional information within that string. So it could be used for logic etc.

For example something like this.
string = “<type=TimeStamp><format=dd/MM/yyyy><data=2020-05-15>”

and by some ways the infomation can be extract by sth similar to string(“type”) which will output “TimeStamp”

Any suggestion on how should I approach this? json maybe?

Hi @puff

If i am right you need to have variable storing time stamp

like dd-MM-yyyy:HH:mm:sss:fff format!

you can get a type of variable using GetType() method!

Regards

Sorry maybe I didn’t explain it clearly.

I want to store multiple key value pairs in single string in a way that when the string is pass to another activity, the data can be extracted easily.

for example if I have a string =
"{'type'='timestamp','format'='dd/MM/yyyy','data'='15/09/2021'}"
I can deserialize the whole string as json obj then extract individual value with their key.

Actually I think I just answered my own question, now I’m wondering if there’s a better way.

Hi @puff

Take a look on the thread below!

Regards

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.