var date = new Date('2010-10-11T00:00:00+05:30');
console.log( ((date.getMonth() > 8) ? (date.getMonth() + 1) : ('0' + (date.getMonth() + 1))) + '/' + ((date.getDate() > 9) ? date.getDate() : ('0' + date.getDate())) + '/' + date.getFullYear() );
출처: https://stackoverflow.com/questions/11591854/format-date-to-mm-dd-yyyy-in-javascript
'Client Standard > JavaScript & jQuery' 카테고리의 다른 글
[js] delete obj.key (0) | 2020.10.22 |
---|---|
[Javascript] date sorting (0) | 2020.06.30 |
[Js] 배열 정렬 (0) | 2019.09.06 |
[Tag] br 태그 줄바꿈 (0) | 2019.02.07 |
[Ajax] 콜 이후 obj append (0) | 2019.01.25 |