Saturday, February 25, 2012

Date format

I have a database that is used priamrily by our UK division. The server
default setting is US time date format. Is there a way to set the UK databas
e
to be their date format when ours is USHow about UK division using GETUTCDATE() function?
This will convert the US time to UTC time.
Thanks
GYK|||This would be fine. However, we are running everyhting through or ERP system
"GYK" wrote:

> How about UK division using GETUTCDATE() function?
> This will convert the US time to UTC time.
> --
> Thanks
> GYK|||Input or output? If you are talking about format of the date, I suggest you
read
http://www.karaszi.com/SQLServer/info_datetime.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"DBA" <DBA@.discussions.microsoft.com> wrote in message
news:43049B5F-3F12-43E4-9FA3-BBD860912772@.microsoft.com...
>I have a database that is used priamrily by our UK division. The server
> default setting is US time date format. Is there a way to set the UK datab
ase
> to be their date format when ours is US|||I actually wnat it to be stored in the UK Date Format. Can I do this at a
database level or server level
"Tibor Karaszi" wrote:

> Input or output? If you are talking about format of the date, I suggest yo
u read
> http://www.karaszi.com/SQLServer/info_datetime.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "DBA" <DBA@.discussions.microsoft.com> wrote in message
> news:43049B5F-3F12-43E4-9FA3-BBD860912772@.microsoft.com...
>
>|||As per the article Tibor referenced:
Date and time formats
A common misconception is that SQL Server stores these datatypes in some
particular readable format. That is not the case. SQL Server stores these
values in an internal format (two integers). However, when you use T-SQL to
specify a value (in an INSERT statement, for instance) you express it as a
string. And there are rules for how different datetime string formats are
interpreted by SQL Server. But note that SQL Server does not remember the
format in any way.
You cannot store your date in any format. The stored value is always
location independent and totally unambiguous. Format is only for display and
is determined when you retrieve a datetime value from a table.
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"DBA" <DBA@.discussions.microsoft.com> wrote in message
news:00E8FB51-CE79-4BDC-BADA-2B42C4A79EF4@.microsoft.com...[vbcol=seagreen]
>I actually wnat it to be stored in the UK Date Format. Can I do this at a
> database level or server level
> "Tibor Karaszi" wrote:
>|||So if I want the date format from any app pulling the date from the database
.
If we set the OS itself to be a certain date format, then would it always
display in that format
"Kalen Delaney" wrote:

> As per the article Tibor referenced:
> Date and time formats
> A common misconception is that SQL Server stores these datatypes in some
> particular readable format. That is not the case. SQL Server stores these
> values in an internal format (two integers). However, when you use T-SQL t
o
> specify a value (in an INSERT statement, for instance) you express it as a
> string. And there are rules for how different datetime string formats are
> interpreted by SQL Server. But note that SQL Server does not remember the
> format in any way.
> You cannot store your date in any format. The stored value is always
> location independent and totally unambiguous. Format is only for display a
nd
> is determined when you retrieve a datetime value from a table.
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "DBA" <DBA@.discussions.microsoft.com> wrote in message
> news:00E8FB51-CE79-4BDC-BADA-2B42C4A79EF4@.microsoft.com...
>
>|||Did you check the article I posted? The client application determines the fo
rmatting, SQL Server has
no control of this.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"DBA" <DBA@.discussions.microsoft.com> wrote in message
news:6BDFD13D-110B-478F-B7CE-4CA295352B1A@.microsoft.com...[vbcol=seagreen]
> So if I want the date format from any app pulling the date from the databa
se.
> If we set the OS itself to be a certain date format, then would it always
> display in that format
> "Kalen Delaney" wrote:
>

No comments:

Post a Comment