calgarychinese
MIS
Hi there
I have a table on my asp page that is bound to SQL Server.
The table is like this
<tbody>
<tr>
<td><div id="column1" datafld="EmployeeID" </div></td>
<td><div id="column2" datafld="LastName" </div></td>
<td><div id="column3" datafld="FirstName" </div></td>
<td><div id="column4" datafld="LastModifiedDate" </div></td>
</tr>
</tbody>
When I return my data set from SQL Server (the SQL I issue is, obviously,
SELECT EmployeeID, LastName, FirstName, LastModifiedDate from tblEmployees
Unfortunately when I display the table, the fourth column gives me something like
2006-04-26 13:58:14.857000000
and ALL that I want is just the date component.
So my question is, is there something I can do in my ASP page that would trim the datafld to say the first 10 characters (yyyy-mm-dd takes up 10 characters)? Or must I add one more returning column in my SQL? I don't like changing the SQL just so that I can display something properly... I wish it were something I could fix on the asp client side.
Many thanks.
CalgaryChinese
I have a table on my asp page that is bound to SQL Server.
The table is like this
<tbody>
<tr>
<td><div id="column1" datafld="EmployeeID" </div></td>
<td><div id="column2" datafld="LastName" </div></td>
<td><div id="column3" datafld="FirstName" </div></td>
<td><div id="column4" datafld="LastModifiedDate" </div></td>
</tr>
</tbody>
When I return my data set from SQL Server (the SQL I issue is, obviously,
SELECT EmployeeID, LastName, FirstName, LastModifiedDate from tblEmployees
Unfortunately when I display the table, the fourth column gives me something like
2006-04-26 13:58:14.857000000
and ALL that I want is just the date component.
So my question is, is there something I can do in my ASP page that would trim the datafld to say the first 10 characters (yyyy-mm-dd takes up 10 characters)? Or must I add one more returning column in my SQL? I don't like changing the SQL just so that I can display something properly... I wish it were something I could fix on the asp client side.
Many thanks.
CalgaryChinese