- Home /

Hello all, When I run the following query: SELECT cashoutid, cashoutidbystore, sum(cashouttot_systemtotal) as systemtotal, SUM(actualtotal) AS actualtotal, netdiffrence, PaymentName, cashout_stopdate

FROM Details_CashoutsAndTotals WHERE cashouttot_systemtotal <> 0.00 and cast(cashout_stopdate as date) = '02/27/2012' GROUP by cashoutid, cashoutidbystore, netdiffrence, PaymentName, cashout_stopdate I get this:

![alt text][1]

Looking at the cashout_stopdate column, you will see that there are actual hrs, minutes, and seconds. I need to know if I can convert these to 00:00:00.000, or remove them somehow to where I only have 2012-02-27 date? I have to get rid of the hh:mm:ss in order for the sums to total correctly. any help would be appreciated. [1]: http://ask.sqlservercentral.com/storage/temp/201-needing-date-mod.jpg

FROM Details_CashoutsAndTotals WHERE cashouttot_systemtotal <> 0.00 and cast(cashout_stopdate as date) = '02/27/2012' GROUP by cashoutid, cashoutidbystore, netdiffrence, PaymentName, cashout_stopdate I get this:

![alt text][1]

Looking at the cashout_stopdate column, you will see that there are actual hrs, minutes, and seconds. I need to know if I can convert these to 00:00:00.000, or remove them somehow to where I only have 2012-02-27 date? I have to get rid of the hh:mm:ss in order for the sums to total correctly. any help would be appreciated. [1]: http://ask.sqlservercentral.com/storage/temp/201-needing-date-mod.jpg

needing-date-mod.jpg
(117.0 KiB)

Comment

Copyright 2019 Redgate Software.
Privacy Policy

- Anonymous
- Sign in
- Create
- Ask a question
- Spaces
- Site Issues (NOT FOR DATABASE QUESTIONS)
- Explore
- Topics
- Questions
- Users
- Badges