Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsCan't get year from date using getYear or getFullYear
https://www.eclipse.org/forums/index.php/mv/msg/205715/658406/#msg_658406
In scripted dataset, fetch method, I have the following code:
For rows row["Day"] and row["Month"] I get values that I need (07 and 03), but for row["Year"] I get 111.
When I try to use getFullYear instead of getYear, I get error about this function not defined!
Any idea how to get year from date in this way?
Help needed ASAP!
]]>mkrivic Mising name2011-03-08T11:44:27-00:00Re: Can't get year from date using getYear or getFullYear
https://www.eclipse.org/forums/index.php/mv/msg/205715/658440/#msg_658440
row["Today"].getYear() + 1900;
Jason]]>Jason Weathersby2011-03-08T14:28:41-00:00Re: Can't get year from date using getYear or getFullYear
https://www.eclipse.org/forums/index.php/mv/msg/205715/658939/#msg_658939
Thanks for reply. Your suggestion works fine, but I found another way before your reply: