0

How To Convert dd-mm-yyyy ?

My Ajax Code

enter image description here

My Controller Code

enter image description here

Output

/Date(1608411600000)/
1
  • 2
    Try not to put codes in images. Post them directly into the question description. Commented Jun 17, 2020 at 18:40

2 Answers 2

1

Please try following code in your javascript code block:

new Date(parseInt(data.Result[item].Date)).toDateString()
Sign up to request clarification or add additional context in comments.

2 Comments

new Date(parseInt(data.Result[item].Date)).toDateString() output Invalid Date My Model public DateTime HomeworkDate { get; set; }
then can you convert data.Result[item].Date so that you can get 1608411600000 in frontend?
0

Solved

new Date(parseInt(data.Result[item].Date.substr(6)))

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.