Change Date Format(MDY)to(DMY)

if i enable enable Preserve Format take more time to read
any other solution

@MD_Farhan1

Have you tried this?

1 Like

You can’t do that without enabling Preserve Format option also just modify the Invoke code as below:

' Assuming dt is your DataTable and "NTD/NTE" is the column name
For Each row As DataRow In dt.Rows
    Dim originalDate As DateTime = DateTime.ParseExact(row("NTD/NTE").ToString(), "M/d/yyyy hh:mm:ss", System.Globalization.CultureInfo.InvariantCulture)
    row("NTD/NTE") = originalDate.ToString("dd/MM/yyyy")
Next

Invoked arguments are same.

Since Invoke Code doesn’t take much time in modifying the data keeping preserve Format is also an option. If you don’t want that option please use the above code.

Regards

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