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

SQL select

Hi Experts,

I have table where one column is timestamp type. I need to get rows comparing date part only of timestamp to mine 'YYYY-MM-DD'

Thanks.
0
fpoyavo
Asked:
fpoyavo
1 Solution
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Give us a 'for example..' of what you're trying to pull off here.

SQL expert PortletPaul has an excellent article on SQL Server Date Styles using CONVERT(), where your answer will likely be in there somewhere.
0
 
fpoyavoAuthor Commented:
Hi Jim,

I tried this WHERE convert(varchar, my_tmsp ,110) = '03-20-2014'
 
and it does not work ... empty result

Thanks.
0
 
John_VidmarCommented:
SQL Server's TIMESTAMP data-type has nothing to do with a date and/or time, it's just a binary representation of a consecutive number - it's only good for making sure a row hasn't change since it's been read.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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