Hi t01714500930,
Check this example. Now please take its reference and correct your code.
Database
For this example I have used of Northwind database that you can download using the link given below.
Download Northwind Database
HTML
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" AutoGenerateColumns="false" DataKeyNames="EmployeeID">
<Columns>
<asp:BoundField DataField="EmployeeID" HeaderText="Id" SortExpression="EmployeeID" />
<asp:BoundField DataField="FirstName" HeaderText="Name" SortExpression="FirstName" />
<asp:BoundField DataField="Country" HeaderText="Country" SortExpression="Country" />
<asp:BoundField DataField="BirthDate" HeaderText="Date" SortExpression="BirthDate" />
</Columns>
</asp:GridView>
<br />
<asp:Button Text="Get" runat="server" OnClick="OnGet" />
<hr />
<asp:Label ID="page_last_modify" runat="server" />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:constr%>"
SelectCommand="SELECT * FROM Employees ORDER BY NEWID()"></asp:SqlDataSource>
Code
C#
protected void OnGet(object sender, EventArgs e)
{
page_last_modify.Text = Convert.ToDateTime(GridView1.Rows[0].Cells[3].Text.Trim()).ToString("dd/MM/yyyy");
}
VB.Net
Protected Sub OnGet(ByVal sender As Object, ByVal e As EventArgs)
page_last_modify.Text = Convert.ToDateTime(GridView1.Rows(0).Cells(3).Text.Trim()).ToString("dd/MM/yyyy")
End Sub
Screenshot