Hi Sadakat,
Check this example. Now please take its reference and correct your code.
SQL
CREATE TABLE Employees(
EmployeeID INT IDENTITY(1,1) PRIMARY KEY NOT NULL,
Name NVARCHAR(50) NOT NULL,
BirthDate DATETIME NULL,
Country NVARCHAR(15) NULL
)
GO
INSERT Employees VALUES ('Nancy Davolio','1948-12-08 10:15:00.000','USA')
INSERT Employees VALUES ('Andrew Fuller','1952-02-19 12:39:00.000','USA')
INSERT Employees VALUES ('Janet Leverling','1963-08-30 01:10:00.000','USA')
INSERT Employees VALUES ('Margaret Peacock','1937-09-19 08:59:00.000','USA')
INSERT Employees VALUES ('Steven Buchanan','1955-03-04 15:30:00.000','UK')
INSERT Employees VALUES ('Michael Suyama','1963-07-02 18:20:00.000','UK')
INSERT Employees VALUES ('Robert King','1960-05-29 23:12:00.000','UK')
INSERT Employees VALUES ('Laura Callahan','1958-01-09 04:35:00.000','USA')
INSERT Employees VALUES ('Anne Dodsworth','1966-01-27 06:00:00.000','UK')
HTML
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:BoundField DataField="EmployeeID" HeaderText="Id" />
<asp:BoundField DataField="Name" HeaderText="Name" />
<asp:BoundField DataField="BirthDate" HeaderText="Birth Date" DataFormatString="{0:HH:mm}" />
<asp:TemplateField HeaderText="Date Of Birth">
<ItemTemplate>
<asp:Label ID="Label1" Text='<%# Eval("BirthDate", "{0:HH:mm}") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Country" HeaderText="Country" />
</Columns>
</asp:GridView>
Namespaces
C#
using System.Data;
using System.Configuration;
using System.Data.SqlClient;
VB.Net
Imports System.Data
Imports System.Data.SqlClient
Code
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
GridView1.DataSource = GetData();
GridView1.DataBind();
}
}
private DataTable GetData()
{
DataTable dt = new DataTable();
string conString = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
string query = "SELECT EmployeeID,Name,BirthDate,Country FROM Employees";
SqlCommand cmd = new SqlCommand(query);
using (SqlConnection con = new SqlConnection(conString))
{
using (SqlDataAdapter sda = new SqlDataAdapter())
{
cmd.Connection = con;
sda.SelectCommand = cmd;
sda.Fill(dt);
}
}
return dt;
}
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Me.IsPostBack Then
GridView1.DataSource = GetData()
GridView1.DataBind()
End If
End Sub
Private Function GetData() As DataTable
Dim dt As DataTable = New DataTable()
Dim conString As String = ConfigurationManager.ConnectionStrings("constr").ConnectionString
Dim query As String = "SELECT EmployeeID,Name,BirthDate,Country FROM Employees"
Dim cmd As SqlCommand = New SqlCommand(query)
Using con As SqlConnection = New SqlConnection(conString)
Using sda As SqlDataAdapter = New SqlDataAdapter()
cmd.Connection = con
sda.SelectCommand = cmd
sda.Fill(dt)
End Using
End Using
Return dt
End Function
Screenshot

To display only Time use DataFormatString.For more details about DataFormatString refer below link.
BoundField.DataFormatString Property