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!

problem converting dates 1

Status
Not open for further replies.

psimon88

IS-IT--Management
Jul 21, 2005
66
US
I have a field dtmTimeStamp that comes across as 8/29/2005 10:45:58 PM.

I am only interested in the date.

Another date field comes across normall as 8/29/05

When I do a 'left' SELECT LEFT(dtmTimeStamp , 11) AS date, it comes across as Aug 29, 2005

I'm sure that there's a cast or convert format for this (particularly to format 110 on the msdn site), but can anyone help me with the command?

Thanks.

 

Convert(varchar(10),dtmTempStamp,101) as mydate

provided this is a date field. The sql server timestamp data type is not a date field.
 
thank you very much. Exactly what I wanted.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top