Formatting Date in Class Templates in VS2008 RRS feed

  • Question

  • Hi,

    I have created a class template in VS2008 following the examples on:


    My class file look ok, but I want to be able to format the time in the resulting generated .cs file.  My template Class.cs file has the following code in the header:

     *  Time:       $time$
     *  Author:     $username$

    Which will output:

    *  Date:       2/9/2012 5:36:09 PM
    *  Author:     andez

    I want the time to be displayed as:

    9th February 2012

    Is it possible to achieve this?

    As a result of the steps for creating the template I have followed, I have the Class.cs file and Template.vstemplate zipped into a zip file which is then copied to my user templates folder.

    Any help appreciated.



    Andez (Please mark as answer if it helps)

    Thursday, February 9, 2012 5:41 PM