error in method

i have the following method:

var c = application.getTimeStamp()
year1 = c.getFullYear();
month1 = c.getMonth();

if I run it, I’ll get the following error: getFullYear is not a function.

Hugh??? :shock:

if I do this:

var c = application.getTimeStamp()
year1 = c.getYear();
month1 = c.getMonth();

It returns for month1 = 10 (this is right)
and it returns for year1 = 103 (I don’t think it’s right!)

What am I doing wrong?

Odd, getYear() is JavaScript 1.0 deprecated to getFullYear() in JavaScript 1.2.

Whatever, getYear() returns the year minus 1900 for ALL years. The result you are getting is consistent with this.

  • david

I know these ones too since I have been playing (and grumbling) over dates last friday and monday.

Probably, when you restart your solution you get rid of the message… At least that worked for me!

No, the error stays

what happens if you change

var c = application.TimeStamp()

into

var c = new Date()