Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 from date range with time condition

Author  Topic 

usafelix
Posting Yak Master

165 Posts

Posted - 2014-09-04 : 22:48:57
My boss request extract data by sales amount from below date range.
with sum sale amount total.

aug 25 (09:00-17:00)
aug 26 (09:00-17:00)
aug 27 (09:00- 17:00)
aug 28 (09:00-17:00)

this is my query but have error , Anyone can help ?
--------------------------------------------------------

select shopcode,createdatetime, from xsodetail
where xsodetail

createdatetime BETWEEN
CONVERT(createdatetime,'2014-08-25 09:00') AND
CONVERT(createdatetime,'2014-08-30 17:00')

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2014-09-05 : 00:25:27
answered over here http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=196046


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -