GET month and year from Filename

  • Hi,

    I will have excel file every month to load into a sqlserver table. For that I need to add a new colum named dateloaded. The file will be something like this 02-2011 FileName.xls for the month of feb. For march 03-2011 FileName.xls . I need to get the month and year from the filename and the dateloaded field should be 2011-01-01 for the month of Jan, 2011-02-01 for Feb. No matter whichever date the file is loaded for the current month, the date should be 01. I need to grab the month and the year.

    How do I do that using derived colum ?

    Please help

    Thanks.

  • Please avoid posting the same question in multiple forum sections.

    Please answer my question in your other post.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply