Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Casting one datetime as date converts other datetime fields

$
0
0
I have a table with two DateTime fields. When I select them and cast one of them as date, it returns them both as date. For example:

select
orderdate
from tableA

would return results in datetime format. But this:

select

Viewing all articles
Browse latest Browse all 3145

Trending Articles