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 2000 Forums
 SQL Server Development (2000)
 SQL Date Problems

Author  Topic 

ChetShah
Starting Member

37 Posts

Posted - 2003-10-07 : 05:27:42
Hi,

Firstly, i have changed the language settings for user on the server to British English. I the encountered the following date problems

If i ran the following query

select SR_CST_Num,
SR_AREA,
X_FSA_BATCH_ID,
CL.Created
from S_SRV_REQ CL inner join S_SRV_REQ_X CLX
ON CL.Row_id = CLX.Row_Id
and (CL.Created between '01/09/2003' and '08/09/2003')
and (SR_AREA LIKE 'PP%' or SR_AREA LIKE 'FSAVC%')
and CLX.X_ATTRIB_176 = 'Investments'
and X_FSA_BATCH_ID like '%FSAVC%'

I have no rows returned. However by adding an extra day on the CL.Created column so changing '08/09/2003' to '09/09/2003' - i get back some rows. However strangely the created date on them is


FEERI1-2L4R-9 PP - transfer FSAVC 406 2003-09-08 12:38:44.000
MIFSL1-2L4W-0 PP - transfer FSAVC 406 2003-09-08 12:38:44.000

So why is this happening??

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2003-10-07 : 05:52:06
Date is a point in Time, not all day around o'clock.
And between '01/09/2003' and '08/09/2003'
in fact is between '01/09/2003 00:00:00.000' and
'08/09/2003 00:00:00.000'
< 2003-09-08 12:38:44.000
Go to Top of Page
   

- Advertisement -