M_L
1
Hi all,
I have an Excel datatable as input for the Bulk Queue items activity.
The date format in my Excel datatable = dd=MM-yyyy.
Then I assign the date as string to my process, as below.

How can I convert my string date to an text/date like: dd.MM.yyyy
Thank you in advance.
Gokul001
(Gokul Balaji)
2
HI @M_L
Try with this expression
DateTime.ParseExact(in_Transaction.SpecificContent("Start").Tostring,"dd-MM-yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("dd.MM.yyyy")
Regards
Gokul
1 Like
M_L
3
Hi,
Thank you for the fast response.
Seems like there goes something wrong 
Gokul001
(Gokul Balaji)
4
HI @M_L
Try with this expression
DateTime.ParseExact(in_TransactionItem.SpecificContent("Start").Tostring,"dd-MM-yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("dd.MM.yyyy")
Note : You need to update the Input parameter
1 Like
M_L
5
Hi,
Still got an error
String was nog recofnize as a valid Datetime.
It’s like below in Excel.




Kind regards 
Gokul001
(Gokul Balaji)
6
Hi @M_L
Print the Date in the log message and get the date format from it.
in_TransactionItem.SpecificContent("Start").Tostring
And update the date format in the expression and check it

Regards
Gokul
1 Like
Try this expression @M_L
It will work on all formats you just need to add the other format in the string of array
DateTime.ParseExact(in_TransactionItem.SpecificContent("Start").Tostring,{"dd-MM-yyyy","dd.MM.yyyy"},System.Globalization.CultureInfo.InvariantCulture,System.Globalization.DateTimeStyles.None).ToString("dd.MM.yyyy")
1 Like
M_L
8
Thank you, my date notation was dd/MM/yyyy 00:00:00. Works now 
1 Like
system
(system)
Closed
9
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.