24 hour time switches to incorrect am/pm time

24 hour time switches to incorrect am/pm time

Post by Ric Griff » Tue, 09 May 2000 04:00:00



Occassionally our SQL 7.0 sp1 on NT sp5 will change the time stamp on a
record from say 5-8-00 01:00:00 to 5-8-00 1:00 pm. It has also gone from
13:00 back to 1:00  am. This occurs at no particular date or time. A partial
solution seems to be to leave the SQL server logged in all the times. We
have already set all computers on our network to 24 hour clock. We also
hacked the registry and set all Default settings to 24 hour.
HELP!!

Rick Griffy, MCP

 
 
 

24 hour time switches to incorrect am/pm time

Post by BPMargoli » Tue, 09 May 2000 04:00:00


Ric,

A timestamp data type in SQL Server is not a datetime data type. A timestamp
data type bears no relation to a date and or a time. So I'll assume that you are
referring to a datetime data type.

It is also unclear just what you mean when you say that the value changes. If
you are saying that when you query a row in a table it returns 1AM, but, without
changing the data, a later query returns 1PM, then you have, or more properly,
Microsoft has a major problem. Data stored in a table can not, must not change
unless an update is applied to the row.

If you are saying that when the data in **entered** into the table, the value is
sometimes entered as 1AM and sometimes as 1PM, my first guess is that the SQL
(the code) is not running on your SQL Server inside a stored procedure, but
rather from a client application, and the client application is pulling the date
and time from the client machine. Perhaps you can track down which rows are in
error, and see if they can all be traced to one or a handful of client machines.

---------------------------------------------------------------
BP Margolin
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc) which can be
cut and pasted into Query Analyzer is appreciated.


Quote:> Occassionally our SQL 7.0 sp1 on NT sp5 will change the time stamp on a
> record from say 5-8-00 01:00:00 to 5-8-00 1:00 pm. It has also gone from
> 13:00 back to 1:00  am. This occurs at no particular date or time. A partial
> solution seems to be to leave the SQL server logged in all the times. We
> have already set all computers on our network to 24 hour clock. We also
> hacked the registry and set all Default settings to 24 hour.
> HELP!!

> Rick Griffy, MCP


 
 
 

1. DTS causes 24hour clock time to change to am/pm and loses or gains 12 hours

All SQL 7 sp1 on NT 4.0 sp5 tables reflect the true date/time, however, when
DTS moves it to our FoxPro tables, it changes it to an offset 12 hours. Most
of the time this does not occur. It seems to happen every 20 to 50 records.
For example, SQL shows a time of 0100 and the record after DTS will show
1:00pm

Any suggestions would be appreciated.

Thanks,

Ric Griffy, MCP

2. D3 - Printing to LPT Port. What are the PCL commands to change F ont size/type ?

3. Getting AM/PM Time formatting in a field with two Times

4. URGENT 2: LOGGING IN INFORMIX

5. 24 hour time

6. Inverted index

7. Calculating Time ( in 24 Hour Clock )

8. Backup name

9. Returning 24 hour time from datepart

10. 24-hour time format question

11. 24 Hour Time In PDOXWIN45

12. preparing Date Time Year To Second for last 24 hours

13. 24 hour time format