0

I am working on a tracker where i need the results in form of month and year for the entered dates. Eg. Input Entry date : 20-02-2017 (dd-mm-yyyy), (calculated) Output expected : Feb-17

I use SharePoint 2010

Sundeep P

0

If you are using JavaScript, you will have to get input in mm-dd-yyyy format.

var Months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
var dt = new Date('02-20-2017');
var newDt = Months[dt.getMonth()] + '-' + dt.getFullYear().toString().substr(2,2);

It will give your prefeerred output Feb-17

0

In a Calculated Column Formula use:

=TEXT( [Input Entrydate] , "mmm-yyy" )

source: http://www.viewmaster365.com/365coach/#/Calculated_Column_Functions_List

  • Thanks Danny, it worked i only had to remove extra spaces =TEXT([Entry Date],"mmm-yyy") – sundeep panchal Feb 21 '17 at 3:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.