I have a datatable, i have fetched Datetime from column,i need to convert datetime(string) value to shortdate.
use .Toshartdatestring instead of .tostring
dateformat should be String data type (because of your expression returns string)
If you want to convert the string to datetime, then
dateformat = Convert.ToDateTime(string)
Welcome to the community…
Try to use like this it works fine for me…
This works perfectly
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
Here is an activity called DateTime parse to data table that to convert the data table column to DateTime.