These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Forms - "Weekend Ending Date" used to Poplulate Date Fields

dcm6276
Registered: Feb 19 2010
Posts: 5
Answered

Hello,

This is my first topic, so my apologies if it is then wrong place...

[img]http://img15.imageshack.us/img15/5605/dateh.jpg[/img]

Quick question (using Acrobat 9.0 CS4 Pro Ext.),

I am trying to set up a form where I input the week ending date (xx-xx-xx) into field "date_1"

Once the week-ending date is input into "date_1", I would like the following fields to populate with the dates from the prior week (Monday-Sunday) "date_2", "date_3", "date_4", "date_5", "date_6", "date_7", and "date_8" respectively. Where the week-ending date, "date_1" equals the Sunday date "date_8"

Example:

*Input 02-21-10 into field "date_1"

*Auto-populate the following:
"date_2" 02-15-10
"date_3" 02-16-10
"date_4" 02-17-10
"date_5" 02-18-10
"date_6" 02-19-10
"date_7" 02-20-10
"date_8" 02-21-10

Can I use any formula with some sort of "date"+1 calulation like you can in MS Excel, or must I use some sort of script? I am not familiar with formulas or scripts in Acrobat, so any help would be appreciated. Hope I explained sufficiently.

Thank you all in advance!

My Product Information:
Acrobat Pro Extended 9.0, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
Yes, see Thom Parker's articles about the date calculation.

You will be converting the inputed date to the JavaScript date object, getting the value of the object and adding the necessary value to add one day and then reformatting the result back to a formatted character string.

George Kaiser

dcm6276
Registered: Feb 19 2010
Posts: 5
Link Please...
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi dcm6276,

http://www.acrobatusers.com/tutorials/2006/date_time_part1

For future reference since you are new here, there are loads of great tutorials in the Learning Center (top left menu item in the upper nav bar of this site). You can search by author (Thom Parker) or the keyword Date Calculation works in this instance too. You will find this to be a super resource with hours and hours of really helpful information for getting things done in Acrobat and PDFs.

You will need to write some scripts for this.

Hope this helps,

Dimitri
WindJack Solutions
www.pdfscripting.com
www.windjack.com
dcm6276
Registered: Feb 19 2010
Posts: 5
10-4...thanks for the help.