# Trace(date.getFullYear()... \> how to show O N L Y the year?

**URL:** https://forum.kirupa.com/t/trace-date-getfullyear-how-to-show-o-n-l-y-the-year/167263
**Category:** Uncategorized
**Created:** [October 26, 2005, 6:23pm UTC](https://forum.kirupa.com/t/trace-date-getfullyear-how-to-show-o-n-l-y-the-year/167263 "2005-10-26T18:23:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![multimediamkt](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@multimediamkt](https://forum.kirupa.com/u/multimediamkt)
#### Post date: [October 26, 2005, 6:23pm UTC](https://forum.kirupa.com/t/trace-date-getfullyear-how-to-show-o-n-l-y-the-year/167263/1 "2005-10-26T18:23:00Z")

</div>

trace(date.getFullYear()… \> how to show O N L Y the year ? ?

I´ve found this on the action script dictionary :

…  
var date:Date = new Date();  
trace(date.getYear()); // displays 104  
trace(date.getFullYear()); // displays current year

…

var date is shown by means a dynamic txt , variable = date ;  
week day , month , date , local hour and GMT , and finally  
what I am actually interested : the four digits format year : 2005 ,  
are exhibited ;  
what it has to be added to the code to show nothing but year ?  
Thank you
