0

Hi i need help in converting data-time format. I'm using Cordova and JqueryMobile, my web services are in asp.net. In response of my Ajax call i get date in the format below.

"/Date(1425935535000+0000)/"

I need to convert it to DD-MMM format (i.e 13-Mar ) what utility i use to convert it. any plugin is appreciated. i have also tried moment.js but it fails here is what i have done so far jsfiddle

1 Answer 1

2

Try this,

var Months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
var dt = new Date(1425935535000+0000);

var sFinalDate = dt.getDate() + " " + Months[dt.getMonth()]

JSFIDDLE: http://jsfiddle.net/ed3qavuj/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.