Link to home
Start Free TrialLog in
Avatar of Lydia626
Lydia626

asked on

SQL need help with date

Hello all,

I am trying to convert how I see a date from a select statement.

Right now I am getting date from my table like this. select LogDate from TestLog with (nolock)

And the output is 2011-08-16 09:45:33.260


Is there a way to do the select so I see the date as mmyyyy ?
ASKER CERTIFIED SOLUTION
Avatar of Sharath S
Sharath S
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
try this

select right(replace(convert(varchar,LogDate,103),'/',''),6) from TestLog