Expand my Community achievements bar.

date: showing the current quarter

Avatar

Level 2

Hi,

I want a field where you can chosse the current quarter. Is this possible? Has it something to do with date format? date.short, medium, long,...?

Thanks in advance for helping me!

Matthias

3 Replies

Avatar

Level 2
  • First option:

in Acrobat Pro I would write something like this (the "else" is still missing; second problem is that I can't make this for all years...)

var

DatumsUhrzeitfeld4 = this.getAttribute("DatumsUhrzeitfeld4");

if

(DatumsUhrzeitfeld4 = "August 2010")

{DatumsUhrzeitfeld4

= "Quartal 3"}

if

(DatumsUhrzeitfeld4 = "September 2010")

{DatumsUhrzeitfeld4

= "Quartal 3"}

if

(DatumsUhrzeitfeld4 = "Oktober 2010")

{DatumsUhrzeitfeld4

= "Quartal 4"}

if

(DatumsUhrzeitfeld4 = "November 2010")

{DatumsUhrzeitfeld4

= "Quartal 4"}

if

(DatumsUhrzeitfeld4 = "Dezember 2010")

{DatumsUhrzeitfeld4

= "Quartal 4"}

  • Second option:

http://forums.adobe.com/message/333985#333985

Sorry, misread the issue. The Quarter will be based on the company you are working for . If their year-end is the same as a calendar yearend (Dec 31), then the example below will be accurate. Change the dates based on the company requirements.
You can hardcode variables into your application.cfm page.
quarter1start = "01-jan-";
quarter2start = "01-apr-";
quarter3start = "01-jul-";
quarter4start = "01-oct-";

The end of each quarter is programatically always the day before the start of the next quarter.
I would add the 'year' to the equation dynamically, to keep it forward compatible.

But where shall I write this?

thx in advance 4 helping me!

Avatar

Level 10

Hi Matthias,

Here is a sample which is based on one in LC Designer help. It just deals with the month, so will work for any year.

https://acrobat.com/#d=UrmENX22OwMFNbU2U5tVtw

I hope that helps,

Niall

Avatar

Level 2

Hi Niall,

your sample was very useful. Thank you very much!

Matthias