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
 trx date time = system date time

Author  Topic 

usafelix
Posting Yak Master

165 Posts

Posted - 2014-09-01 : 14:02:33
Anyone can give idea how to edit this query for output the result is selected the sales transaction matching the system current time range like now is 22:14pm then I regard to select all sale record within the 22:00-22:59 as well.

Table field : trx_datetime yyyy-mm-dd hh:mm:xxx

This query is it wrong ?
select * from sale_memo where trx_datetime>=datepart(hh,getdate())

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2014-09-01 : 14:17:54
Does your query give you the results you want? If so, it's not wrong!
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2014-09-02 : 03:03:03
see your other thread http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=195994


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

Go to Top of Page
   

- Advertisement -