Feb 13, 2004 #1 mayu03 Programmer Joined Oct 3, 2003 Messages 91 Location US What is incorrect in this select? select Format('01/01/04','yyyymmdd')
Feb 13, 2004 #2 r937 Technical User Joined Jun 30, 2002 Messages 8,847 Location CA 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 http://r937.com/ SQL Consulting Upvote 0 Downvote
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 http://r937.com/ SQL Consulting
Feb 13, 2004 Thread starter #3 mayu03 Programmer Joined Oct 3, 2003 Messages 91 Location US Can you tell me what function should I use? Upvote 0 Downvote
Feb 13, 2004 #4 r937 Technical User Joined Jun 30, 2002 Messages 8,847 Location CA CONVERT rudy http://r937.com/ SQL Consulting Upvote 0 Downvote
Feb 13, 2004 #5 mimi2 Technical User Joined Apr 2, 2002 Messages 407 Location CA is this ok ? PRINT Convert(Char(20), getdate(), 120) PRINT Convert(Char(20), getdate(), 111) Upvote 0 Downvote