Transact sql month and year Jan-07 from datefield

Posted on 2007-08-10
Last Modified: 2012-08-14
HOw do I get datefield in transact sql to show me Jan-07,Feb-07?
I used month() and I get numbers

I use datepart(mm, Datefield) and get numbers.
Question by:MarcosInfo
    LVL 15

    Expert Comment

    select convert(varchar, getdate(), 107)
    LVL 15

    Accepted Solution

    select convert(char(3), getdate(), 107) + '-' + convert(char(2), getdate(), 2)

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
    For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
    The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
    Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

    755 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

    16 Experts available now in Live!

    Get 1:1 Help Now