Quote:> Only the date format output changes
If the IIS server is set to american then the dates will be sent to SQL
Server in an american format. This is not dependant on how the SQL server is
eg IIS will this 1.4.98 = jan 4th 1998 not 1st April 1998
if your clients are set to US which you may have no control over then using
the vbscript functions will give you the problem where 10/9/98 is greater
than 4/10/98 !!!
I have just finished creating a web site where dates were critical and I
found you should
1. Set the SQL Server to the country you require
2. Set the IIS Server to the country you require
3. Don't rely on the clients unless you can force them to all be set
let SQL Server do the sorting though and here is a little script to show how
it could be done
drop table testall
create table testall (
insert into testall values ("1/1/98 12:00",2,"test 1")
insert into testall values ("1/2/98 12:00",2,"test 1")
insert into testall values ("1/2/98 13:00",1,"test 1")
insert into testall values ("1/2/98 14:00",3,"test 1")
insert into testall values ("1/3/98 12:00",2,"test 1")
select * from testall order by datepart(dd,dates), priority,
>>I am new to ASP and SQL server 6.5. I have a few questions.
>>1) How is a datetime datatype stored in SQL server 6.5? Is it stored as a
>>string of characters or as an object?
> It is not stored as a string of characters but SQL convert function can
>>2) Is the stored value dependent on the server language setup (for example
>>US english server stores in english) or is it independent?
> Only the date format output changes
>>3) We want to sort by date, priority and hour, where the date and hour
>>from the same datetime field, and the priority is an integer. Is it better
>>to do it at the SORT BY clause level or to sort an array of the resulting
>>recordset using VBScript date functions?
> In my opinion it is better to do it on the SQL server because it is why
>we have Data servers for
>>Thanks for any input on this, I would really appreciate any ideas.