Date Format with Variable

is it possible to give this variable in this periods format: “yyyy-MM-dd :yyyy-MM-dd” so that it looks clear? Thanks in advance


Hi @FingFongRobot ,

You want to change the string from 2022-01-172022-01-31 to 2022-01-17 :2022-01-31 ?

Yes exactly…


1 Like

But I have a variable DateM. I don’t know how to assign it. The datum is stored in DateM at add the collection

form the screenshot we assume that DateM is of Datatype String
Simply we can do: DateM.Insert(10,":")

Yes I tried it and it works thank you!! Although can you explain why I have still error?

looks like the list is not initialized

on default value for the list or within an assign the list is to initialize before using it. We do with

new List(of String)

I have already initialized my list. is something missing?

we mentioned: new List(of String)
You did: new Collection

Ok I changed it but still the same error:((

please share your XAML if possible

Sequence1.xaml (8.9 KB)
I hope its enough.


it seems like there are also some coneceptual issues:

You are looping over dt_NewDataTable, but this variable will be NULL as there is no part within the flow where a datatable is read, passed or created

Within the Loop or in general there is no Value Assignment to DateM, so DateM is empty
Same also for ProjektM

Maybe these values a retrieved from the looped row, so do an assignment like

DateM = row(ColNameOrIndex).toString or use it directly within the Add to Collection Item field

Thank you for the answer. I had quickly built sequence for you. Unfortunately I can not send complete process.xaml. The variables are not empty and I have a database. But I mark the chat with “DateM.Insert(10,”:")" as solution. Because it still works with an error message

just do following:

  • (stepwise) debug the flow and watch on the different panels where it is breaking

Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum

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