Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

datetime conversion

$
0
0

I have a parameter datetime

 but i do not have the time setting on my reporting so i am converting my datetime parameter to 

date. Now when i select the date range of part

declare @begindate datetime = '12-12-2012 00:00:00'

declare @enddate datetime = '12-12-2012 23:59:00'

what i did was 

convert(date,@begindate) and convert(date,@enddate)

and filtered 

  Date >= @begindate and Date<=@enddate

it is returning me only one row value that is equal = 12-12-2-12

instead i wanted all the values.

i can see the problem but not the solution


Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>