0

I'm unable to parse date in angularjs, where date is coming from database and instead of showing correct date which is in database, it is showing me '0001-01-01T00:00:00'.Do I need to convert it? Is there any way in angular that convert the date.?

2
  • 1
    in which format do you get the date from the database? and how are you trying to parse it? some code plz Commented Sep 16, 2014 at 12:29
  • it is in date format getting from sql server. Commented Sep 16, 2014 at 12:53

1 Answer 1

1

'0001-01-01T00:00:00' is a unix format (ISO 8601 or another). This format is natively supported by javascript.

If you want to convert it in a readable date, do :

var myDate = new Date('0001-01-01T00:00:00')
Sign up to request clarification or add additional context in comments.

2 Comments

Sort out the problem.. Thanks benek
You're welcome. Do not hesitate to check my answer if it is the right one :)

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.