I am very new to sequel server and am accessing for the first time. I have
found that I can interrogate a 'table' where a field called orders.order_dat
e
is in shortdatetime by:-
select * from orders where orders.order_date = '1 FEB 2005'
What are the 'acceptable' 'wordings' for
'1 FEB 2005'.
I'd prefer something along the line of
'01/02/2005'
...or whatever. Can you list the acceptable formats or point me to a web
page that will help with this/and/or other problems.
What are the implications of US and UK formats; We use ddmmyyy, the US use
(the annoying) mmddyyy format!! It's a good job they don't do something
similar with values for currently as well! 2 million 5 hundred thousand
dollars would be written $500000,2000000.00!!!
IanThe preferred, culture agnostic way would be yyyymmdd like so
Select F1...Fn
From Orders
Where Order_Date = '20050201'
Using this format, it will not matter if the server is in the UK or the US.
Thomas
"Barley Man" <BarleyMan@.discussions.microsoft.com> wrote in message
news:F8B54405-F1D3-488C-9457-9E04B3E7F993@.microsoft.com...
>I am very new to sequel server and am accessing for the first time. I have
> found that I can interrogate a 'table' where a field called orders.order_d
ate
> is in shortdatetime by:-
> select * from orders where orders.order_date = '1 FEB 2005'
> What are the 'acceptable' 'wordings' for
> '1 FEB 2005'.
> I'd prefer something along the line of
> '01/02/2005'
> ...or whatever. Can you list the acceptable formats or point me to a web
> page that will help with this/and/or other problems.
> What are the implications of US and UK formats; We use ddmmyyy, the US use
> (the annoying) mmddyyy format!! It's a good job they don't do something
> similar with values for currently as well! 2 million 5 hundred thousand
> dollars would be written $500000,2000000.00!!!
> Ian|||Here is a good article about datetime/smalldatetime data types.
http://www.karaszi.com/SQLServer/info_datetime.asp
The ultimate guide to the datetime datatypes
AMB
"Barley Man" wrote:
> I am very new to sequel server and am accessing for the first time. I have
> found that I can interrogate a 'table' where a field called orders.order_d
ate
> is in shortdatetime by:-
> select * from orders where orders.order_date = '1 FEB 2005'
> What are the 'acceptable' 'wordings' for
> '1 FEB 2005'.
> I'd prefer something along the line of
> '01/02/2005'
> ...or whatever. Can you list the acceptable formats or point me to a web
> page that will help with this/and/or other problems.
> What are the implications of US and UK formats; We use ddmmyyy, the US use
> (the annoying) mmddyyy format!! It's a good job they don't do something
> similar with values for currently as well! 2 million 5 hundred thousand
> dollars would be written $500000,2000000.00!!!
> Ian
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment