Waller
Waller

Reputation: 1873

Converting dates SQL Server

Can anyone stop me going crazy here. I have the following dataset, and I can't use covert. I need them all in a datetime format.

You can see what I've tried in the commented code, but I'm seriously lost with this one.

SALESDATE is mm/dd/yyyy and EVENTDATE is the same.

https://i.sstatic.net/RyaGB.jpg

My attempt

Upvotes: 0

Views: 98

Answers (1)

Mez
Mez

Reputation: 4726

Try the following

select 
   convert(varchar(30), convert(datetime, salesdate), 101) 
from [OLE DB DESTINATION03]

Upvotes: 2

Related Questions