Hello,
I have a datatable where the last column has the type datetime.
The format of that date time column is MM/dd/yyyy hh:mm and I want the format dd/MM/yyyy.
What can I do to obtain the format that I want ?
Thanks
Hello,
I have a datatable where the last column has the type datetime.
The format of that date time column is MM/dd/yyyy hh:mm and I want the format dd/MM/yyyy.
What can I do to obtain the format that I want ?
Thanks
Hello @Maria_Ines_Almeida
Please refer to the below doc.
dateST is the variable with the date value.
DateTime.ParseExact(dateST.ToString(),“MM/dd/yyyy hh:mm”,Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”)
I tried the way you said but it returns an error
Can you please check the value in the CurrentRow.Item(6).ToString()
yes
DateTime.ParseExact( CurrentRow.Item(6).ToString(),“MM/dd/yyyy hh:mm:ss”,Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”)
Try this.
Also you can check the Format value activity.
in the LHS, please assign a string variable instead of CurrenRow expression.