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!

select

Status
Not open for further replies.

mayu03

Programmer
Oct 3, 2003
91
US
What is incorrect in this select?
select Format('01/01/04','yyyymmdd')
 
the main thing that's wrong is that there is no such function in sql server

and assuming there were, it is not guaranteed that the first parameter will be interpreted as a datetime value, rather than as a character string

rudy
SQL Consulting
 
Can you tell me what function should I use?
 
is this ok ?

PRINT Convert(Char(20), getdate(), 120)
PRINT Convert(Char(20), getdate(), 111)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top