hi
I have a query which reads data from MS SQL TABLE and shows it on aspx page. There is a field in table which data type is DATE, but when it got displayed on aspx page ,it showed up as DATETIME.
here is my code
I have a query which reads data from MS SQL TABLE and shows it on aspx page. There is a field in table which data type is DATE, but when it got displayed on aspx page ,it showed up as DATETIME.
here is my code
Shared Function Get_Leave_History(ByVal employee_name As String) As DataTable Dim dbCon As New DBConn() Dim str As String = "select [leave_type] as [Leave Type],[from_date] as [From Date],[to_date] as [To Date],[Contact_Number] as [Contact Number],[Address] ,[remarks] ,[Status] from leave where employee_id in (select employee_id from employee where username='" + employee_name + "')" Dim DS As New DataSet dbCon.Open() dbCon.FillDataSet(DS, "Data", str) dbCon.Close() Return DS.Tables("Data") End Function