RE: Date Question ...

RE: Date Question ...

 

  

Look at convert function in BOL:
select convert(varchar(14), getdate(), 111), you can you something else
instead of 111 if you need to have a different format.
Julia

-----Original Message-----
From: Kaustubh Puranik [mailto:Kaustubh.[Email Address Removed] Friday, May 30, 2003 9:52 AM
To: LazyDBA.com Discussion
Subject: Date Question ...


Hi All,

Kind of a stupid question. How can I get the date from
datetime? I had done
this before but some how couldn't think today, I think I am
ready for the
week end.. :)

For example :
This is what I have : 2003-05-29 11:49:28.680
and I need : 2003-05-29

---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To unsubscribe, e-mail: mssqldba-[Email Address Removed] additional commands, e-mail: mssqldba-[Email Address Removed]MS Sql Server LazyDBA home page