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
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
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
In a Calculated Column Formula use:
=TEXT( [Input Entrydate] , "mmm-yyy" )
source: http://www.viewmaster365.com/365coach/#/Calculated_Column_Functions_List