G
GoodMorningSky
Hi all,
The actual data is
10/12/2004 6:04:06 PM
being retrieved.
However,
when I retrieve it using ExectueScalar();
strSql = "SELECT LastTransferedTime FROM tblDepartment WHERE
DepartmentCode = 'HRD'"
cnn = new SqlConnection(DBHandler.HQstrCnn);
cmd = new SqlCommand(strSql, cnn);
cmd.Connection.Open();
result = cmd.ExecuteScalar();
cmd.Connection.Close();
It returns short date format
?result
{10/12/2004}
[System.DateTime]: {10/12/2004}
I need long datetime format which is '10/12/2004 6:04:06 PM' (real data in
DB)
How can I do that?
and what's problem here?
The actual data is
10/12/2004 6:04:06 PM
being retrieved.
However,
when I retrieve it using ExectueScalar();
strSql = "SELECT LastTransferedTime FROM tblDepartment WHERE
DepartmentCode = 'HRD'"
cnn = new SqlConnection(DBHandler.HQstrCnn);
cmd = new SqlCommand(strSql, cnn);
cmd.Connection.Open();
result = cmd.ExecuteScalar();
cmd.Connection.Close();
It returns short date format
?result
{10/12/2004}
[System.DateTime]: {10/12/2004}
I need long datetime format which is '10/12/2004 6:04:06 PM' (real data in
DB)
How can I do that?
and what's problem here?