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
 General SQL Server Forums
 New to SQL Server Programming
 urgent help

Author  Topic 

usafelix
Posting Yak Master

165 Posts

Posted - 2014-09-04 : 22:15:58
Anyone can help me, my boss request get the sales from aug 25 to aug 30 from time 9:00 to 17:00 all the sales amount , and qty ?

How I can write this query ?

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2014-09-05 : 00:24:09
[code]
WHERE sales_datetime >= '2014-08-25'
and sales_datetime < '2014-08-31'
and convert(varchar(5), sales_datetime, 108) between '09:00' and '17:00'
[/code]


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

Go to Top of Page
   

- Advertisement -