Home All Groups Group Topic Archive Search About

UTC time difference between EM and Query Analyzer

Author
23 Sep 2005 10:02 PM
dba56
I have a table that stores UTC dates.  When I open the table in EM, the
time is shown in 12 hour format.  When I execute a select statement
against the same table in Query Analyzer, I get the time in 24 hour
format.   I prefer the 24 hour format.  Is there some setting to get EM
to use the 24 hour format?

For example, the date is saved in UTC format as 13:30:21.  Query
analyzer shows this as 13:30:21.  EM shows this as 1:30:21 PM.

Thanks in advance for any replies.

Author
23 Sep 2005 10:11 PM
Aaron Bertrand [SQL Server MVP]
>I have a table that stores UTC dates.  When I open the table in EM,

Patient: "Doctor, it hurts when I do this."
Doctor: "Don't do that."

> Is there some setting to get EM
> to use the 24 hour format?

I believe this is based on regional settings of the logged in user.

But for several other, much more important reasons, I strongly recommend
reserving data analysis/modification for Query Analyzer, which is better
suited.
Author
24 Sep 2005 12:42 AM
ML
> Patient: "Doctor, it hurts when I do this."
> Doctor: "Don't do that."

(must be pronounced Brooklyn-style)

Payshent: "Dakta, it hoyts when aye do dish."
Dakta: "Well, don't do dish."


ML
Author
26 Sep 2005 1:04 PM
dba56
Aaron,

Thanks for your reply.

I use EM for quick inquiries.  For example, to check if my notification
services event submission ran at the scheduled time.  But I prefer the
12 hour format and my regional settings are set to the 12 hour format.
So you are correct that EM is using the regional settings by default.

I found that there is an option that can be selected for QA that forces
it to use the regional settings. By default, this option is not
selected and that's why QA does not use the regional settings.  Its
under Tools-Options-Connections.  I just needed to check the "Use
regional settings when displaying currency, numbers, date and time"
checkbox and I got the results of my queries in 12 hour format.
Author
26 Sep 2005 1:10 PM
Aaron Bertrand [SQL Server MVP]
> under Tools-Options-Connections.  I just needed to check the "Use
> regional settings when displaying currency, numbers, date and time"
> checkbox and I got the results of my queries in 12 hour format.

That sounds like the opposite of what you were originally asking:

Show quote
>> Is there some setting to get EM to use the 24 hour format?
Author
26 Sep 2005 6:02 PM
dba56
I would have preferred my DB apps to use UTC time in 24 hour format,
which I think is according to standards.  To get EM and QA to use the
24 hour format, as you pointed out,  I would have had to change the
regional settings to the 24 hour format.  But I prefer that Windows and
all my other non-db apps use the standard 12 hour format.  So changing
QA seems to be my best option to getting them EM and QA time to reflect
the same format.

Thanks again for your help.

AddThis Social Bookmark Button