Answered workitem field type date time custom formats

  • Tuesday, March 27, 2012 11:32 AM
     
     

    I have a requirement that a field has to show only date than date time, some thing like MM/dd/yyyy format.

    Please help me on achieving this.

    Thanks,

    Raghusrikanth

All Replies

  • Tuesday, March 27, 2012 11:45 AM
     
     Proposed Answer Has Code

    Hi,

    You can look at the Issue work items definition for the Due Date for example:

                    <Control FieldName="Microsoft.VSTS.Scheduling.DueDate" Type="DateTimeControl" Label="D&amp;ue Date:" LabelPosition="Left" Format="Short" />
    


    Please remember to mark the replies as answers if they help. --- Success, Damir

  • Wednesday, March 28, 2012 7:18 AM
    Moderator
     
     

    Hi Raghusrikanth,

    Thank you for your post.

    I suppose you just want a field just display date not include time. Please choose DateTimeControl for this field, not FieldControl.

    When you edit the WIT, in Field Definition, please select Date Time type. Then, the most inport thing is in Layout tab, please select DateTimeComtrol, do not set FieldControl. You will just see the date not include time.

    Best regards,


    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us

  • Wednesday, March 28, 2012 11:11 AM
     
     

    Hi Lily,

    I Am using date time control only, but when I search the WI using WIQL the out put will be date+time and same when exported to Excel.

    Is there any way to fix this whil exporting to excel?

    Thanks,

    Raghusrikanth

  • Thursday, March 29, 2012 9:15 AM
     
     

    Need to know too.

    Thanks,

    • Edited by mini jacson Thursday, March 29, 2012 9:15 AM
    •  
  • Thursday, March 29, 2012 9:17 AM
    Moderator
     
     Answered

    Hi Raghusrikanth,

    Try to set Excel Format Cells.

    Best regards,


    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us