# Problem with date - getMonth()

**URL:** <https://forum.kirupa.com/t/problem-with-date-getmonth/113259>\
**Category:** Uncategorized\
**Created:** [June 16, 2004, 11:27am UTC](https://forum.kirupa.com/t/problem-with-date-getmonth/113259 "2004-06-16T11:27:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ash123](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@ash123](https://forum.kirupa.com/u/ash123)\
**Post date:** [June 16, 2004, 11:27am UTC](https://forum.kirupa.com/t/problem-with-date-getmonth/113259/1 "2004-06-16T11:27:49Z")

</div>

Hi,

I am facing one problem with date object. My date textfield textfield displays month as 5 …ie MAY…but Actually it should be 6. Date and Year is coming fine. I do checked my systems date, month also.

And most surprising is its showing the same problem on the other machines also. Can anyone help me out with this…pls…

here is the code:

da = new Date();  
date.text =“Printed on “+ da.getDate()+”/”+da.getMonth()+"/"+da.getFullYear() + " at " + da.getHours() add “:” add da.getMinutes() add “:” add da.getSeconds();

Thanx  
Ash

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2004, 11:34am UTC](https://forum.kirupa.com/t/problem-with-date-getmonth/113259/2 "2004-06-16T11:34:19Z")

</div>

That’s perfectly normal. In Flash, the month numbers start from 0, not from 1.

Just use da.getMonth()+1 and it shows you the month correctly. :thumb:
