converting mm/dd/yy to mm/dd/yyyy

Posted on 2006-04-06
Last Modified: 2008-01-09
I'm working with a DB column in which I need to update all the date values from mm/dd/yy to mm/dd/yyyy, since i'm not a SQL expert I'm a little stumped.

Also, This date column is a varchar instead of datetime.

I'm not sure how the point awarding works, will 100 be enough?
Question by:ken1906
    LVL 15

    Accepted Solution

    This will result in a char column of length 10 having the format mm/dd/yyyy.

    convert(char(10),cast(yourcolumn as datetime),101)

    The points are fine.  Use more for tough questions or if you need an urgent response.

    Author Comment

    Thank you very much.  I greatly appreciate the help.

    Featured Post

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
    The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
    This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
    Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now