Jun 2, 2004 #1 jahooper Programmer Jan 20, 2003 8 US I need to convert some dates to yyyy-mm-dd format for XML. I know the following: convert(varchar,GetDate(),126) --> 2004-06-02T16:13:49.293 My question is, how do I get just the yyyy-mm-dd component without the time? Thanks for any suggestions!
I need to convert some dates to yyyy-mm-dd format for XML. I know the following: convert(varchar,GetDate(),126) --> 2004-06-02T16:13:49.293 My question is, how do I get just the yyyy-mm-dd component without the time? Thanks for any suggestions!
Jun 2, 2004 #2 TheBugSlayer Programmer Sep 22, 2002 887 US SELECT CONVERT(VARCHAR(10),GETDATE(),120) is what you need. Good luck. Upvote 0 Downvote
Jun 2, 2004 Thread starter #3 jahooper Programmer Jan 20, 2003 8 US Thanks for the quick tip. That did it! Upvote 0 Downvote