# Display Current Year

**URL:** <https://forum.wixstudio.com/t/display-current-year/33919>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [June 26, 2018, 8:35am UTC](https://forum.wixstudio.com/t/display-current-year/33919 "2018-06-26T08:35:11Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![brunodelat](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@brunodelat](https://forum.wixstudio.com/u/brunodelat)\
**Post date:** [June 26, 2018, 8:35am UTC](https://forum.wixstudio.com/t/display-current-year/33919/1 "2018-06-26T08:35:11Z")

</div>

Dears

I want to show the current year on my website. (For the copyright logo, I don’t want to remember to update it yearly)

I followed the instructions on [https://support.wix.com/en/article/how-to-display-todays-date-on-your-site](https://support.wix.com/en/article/how-to-display-todays-date-on-your-site) and I’m able to show the current date.

How to change the code so I get the year in stead of the current date?  
Sorry for this newbie question, it must be something small with the data type, but I can’t fix it.

I tried, $w(“#dateText”).text = today.getFullYear(); but that returns an error that 2018 is not of the type string.

Thanks for the assistance

Bruno

---

<div class="post-metadata">

**Author:** ![sam-wix](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/sam-wix/32/683_2.png) [@sam-wix](https://forum.wixstudio.com/u/sam-wix)\
**Post date:** [June 26, 2018, 9:00am UTC](https://forum.wixstudio.com/t/display-current-year/33919/2 "2018-06-26T09:00:34Z")

</div>

Try:

```javascript
$w("#dateText").text = today.getFullYear().toString();

```

---

<div class="post-metadata">

**Author:** ![brunodelat](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@brunodelat](https://forum.wixstudio.com/u/brunodelat)\
**Post date:** [June 26, 2018, 11:47am UTC](https://forum.wixstudio.com/t/display-current-year/33919/3 "2018-06-26T11:47:10Z")

</div>

Thanks. That works

---

<div class="post-metadata">

**Author:** ![stephenmccall](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/stephenmccall/32/1773_2.png) [@stephenmccall](https://forum.wixstudio.com/u/stephenmccall)\
**Post date:** [September 17, 2018, 4:36pm UTC](https://forum.wixstudio.com/t/display-current-year/33919/4 "2018-09-17T16:36:53Z")

</div>

Thanks for the code, I was wondering if anyone knows how to add a year? so that the next year would be displayed?

---

<div class="post-metadata">

**Author:** ![bonpai](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/bonpai/32/7873_2.png) [@bonpai](https://forum.wixstudio.com/u/bonpai)\
**Post date:** [December 31, 2018, 10:18pm UTC](https://forum.wixstudio.com/t/display-current-year/33919/5 "2018-12-31T22:18:36Z")

</div>

I was able to get this to work, but I want to add the copyright symbol before the year and some text after. So it would look like this “© 2018 company name”. How do I do that in the javascript referenced above?

---

<div class="post-metadata">

**Author:** ![bonpai](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/bonpai/32/7873_2.png) [@bonpai](https://forum.wixstudio.com/u/bonpai)\
**Post date:** [December 31, 2018, 11:35pm UTC](https://forum.wixstudio.com/t/display-current-year/33919/6 "2018-12-31T23:35:39Z")

</div>

@ben thank you for the quick response. That worked perfectly.

---

<div class="post-metadata">

**Author:** ![julie79381](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/julie79381/32/26520_2.png) [@julie79381](https://forum.wixstudio.com/u/julie79381)\
**Post date:** [May 29, 2019, 3:16am UTC](https://forum.wixstudio.com/t/display-current-year/33919/7 "2019-05-29T03:16:36Z")

</div>

Hi, When I get to the stage of pasting the code into the code panel it doesn’t give me an option to paste. can someone explain how I can add the code please?

---

<div class="post-metadata">

**Author:** ![yisrael-wix](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yisrael-wix/32/1107_2.png) [@yisrael-wix](https://forum.wixstudio.com/u/yisrael-wix)\
**Post date:** [May 29, 2019, 6:14am UTC](https://forum.wixstudio.com/t/display-current-year/33919/8 "2019-05-29T06:14:24Z")

</div>

See the article [Corvid: Working in the Code Panel](https://support.wix.com/en/article/corvid-working-in-the-code-panel) .

---

<div class="post-metadata">

**Author:** ![julie79381](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/julie79381/32/26520_2.png) [@julie79381](https://forum.wixstudio.com/u/julie79381)\
**Post date:** [May 29, 2019, 8:01am UTC](https://forum.wixstudio.com/t/display-current-year/33919/9 "2019-05-29T08:01:52Z")

</div>

Thanks - already read that - didn’t help. I copy the code, open the panel, see where to add the code, click on the line “//TODO: write your page related code here…” , but no paste option appears in my right click menu - that is the issue I am having. It lets me type code in that space but I don’t want to type it all out, I want to copy/paste - is that not possible?

---

<div class="post-metadata">

**Author:** ![yisrael-wix](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yisrael-wix/32/1107_2.png) [@yisrael-wix](https://forum.wixstudio.com/u/yisrael-wix)\
**Post date:** [May 29, 2019, 8:04am UTC](https://forum.wixstudio.com/t/display-current-year/33919/10 "2019-05-29T08:04:28Z")

</div>

It’s just the usual keystrokes:  
On a Mac: Command-V  
On a PC: Ctl-V

---

<div class="post-metadata">

**Author:** ![julie79381](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/julie79381/32/26520_2.png) [@julie79381](https://forum.wixstudio.com/u/julie79381)\
**Post date:** [May 29, 2019, 8:21am UTC](https://forum.wixstudio.com/t/display-current-year/33919/11 "2019-05-29T08:21:15Z")

</div>

OK, Ctrl-V works in PC to paste.

---

<div class="post-metadata">

**Author:** ![kasperaamodt](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/kasperaamodt/32/10420_2.png) [@kasperaamodt](https://forum.wixstudio.com/u/kasperaamodt)\
**Post date:** [January 3, 2020, 1:21pm UTC](https://forum.wixstudio.com/t/display-current-year/33919/12 "2020-01-03T13:21:48Z")

</div>

@ [Andrew Galdi](https://www.wix.com/corvid/profile/456154f8-154a-4f32-9e7f-d99f924209ed) What was the answer? I don’t see it.
