• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 431
  • Last Modified:

how to get date from a timestamp field

I have a datetimsatmp field dt1 in SQL server
I need to get the date portion of it

2010-11-14 16:52:26.957

result 2010-11-14
0
countrymeister
Asked:
countrymeister
1 Solution
 
cyberkiwiCommented:
for 2008, just

convert(date, dt1)

for prior

datediff(d, 0, dt1)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now