Link to home
Start Free TrialLog in
Avatar of OHIS
OHISFlag for United States of America

asked on

Problem Converting Smalldatetime to mm/dd/yy in SQL

I can't seem to figure out what I am doing wrong. I have a table that contains a field in a smalldatetime format. I am trying to get sql to populate a text file. I want the smalldatetime field out of sql in the mm/dd/yy format. I am using a simple select statement. But all I get back is the standard sql date display in query analyzer. Here is the code and an example of the output.

Select
Convert(smalldatetime,Prod_Orig_Pub_Dt,1) AS Prod_Orig_Pub_Dt
FROM tbl_Product_FTP

This is what the query window displays....

2004-05-06 00:00:00
ASKER CERTIFIED SOLUTION
Avatar of adwiseman
adwiseman

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