Variable for YEAR only

This forum is for all Flare issues not related to any of the other categories.
Post Reply
scooter262
Propeller Head
Posts: 37
Joined: Wed Mar 11, 2009 11:14 am

Variable for YEAR only

Post by scooter262 »

I've seen a couple of posts on this, but no solution. This works for me.

Code: Select all

Copyright 1996 - <script type="text/javascript">/*<![CDATA[*/document.write((new Date()).getFullYear());/*]]>*/</script>
 My_company#160;. All rights reserved.
The script is the main component: when the Help is generated, it gets converted to the current year.

It won't work for PDFs, however. I need to update that manually every year.
Lydia
Sr. Propeller Head
Posts: 373
Joined: Tue Apr 23, 2013 3:19 am
Location: The Netherlands, Amsterdam Area

Re: Variable for YEAR only

Post by Lydia »

I'm not sure what the problem is with the year, I haven't read all posts.
If you add a DateTime variable to your variable set and define it as yyyy - doesn't this work?
DateTime variable is the second option in the VariableSet Editor:
DateTimeVar.png
You do not have the required permissions to view the files attached to this post.
Using Flare 10.2 and Flare 11 on Win 7
JeromeR
Propeller Head
Posts: 64
Joined: Fri Mar 20, 2009 2:15 pm
Contact:

Re: Variable for YEAR only

Post by JeromeR »

Thanks. This worked. I did not realise we have to enter the date formatin the Definition column. Your illustration made the difference: it's yyyy.
Post Reply