Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert date format on date/stamp

Status
Not open for further replies.

neroe

Technical User
Feb 27, 2003
54
GB
this is the design to one of the fields in my db;
1 [timeStamp] datetime 8 1

this is the default value to it;
(getdate())

and this is an example of what it stores;
15/06/2005 11:35:41

this format is obviously american . . . i need it to be english. any suggestions welcome.
thanks
 
faq183-5834

------
"There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
[banghead]
 
Just as a quickie, how is 15/06/2005 11:35:41 obviously American?

American formatting holds MM/DD/YYYY but there ain't no 15th month in the year.

Rhys

"Vampireware /n/,a project, capable of sucking the lifeblood out of anyone unfortunate enough to be assigned to it, which never actually sees the light of day, but nonetheless refuses to die."

"I see dead pixels!
 
use the convert function. I don't have the codes to use but you can look it up in books online.
 
that was taken from the dev server which is displaying in the english format. the live server is displaying the american format
 
To change how the data is displayed with out using the convert function you'll need to change the collation type of the database from a US collation to a british collation.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(Not quite so old any more.)
 
yes i know. however i am able to do this due to an existing system residing on the server
 
You can change the collation for just the database that you are working on, without effecting the collation of the server, or the other database.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(Not quite so old any more.)
 
i have a table with a smalldatetime typed column.
when i try to do a select statement:
select * from quotes where quotedate ='6/23/2005 1:23:00'

it return 0 row to me, but there are rows with on this date.

Can someone help me out with a sql query?

Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top