Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Need code to Have script to perform the following “DateofLoan” Field = 10/1/1991 and needs to have a Code of “L” auto populate in “LFundsAmt” Field and anything greater than 10/1/1991 would have a Code of “R” auto populate in “LFundsAmt”

New Here ,
Jun 02, 2016 Jun 02, 2016

Need code to Have script to perform the following “DateofLoan” Field = 10/1/1991 and needs to have a Code of “L”  auto populate in “LFundsAmt” Field and anything greater than 10/1/1991 would have a Code of “R” auto populate in “LFundsAmt”

TOPICS
Acrobat SDK and JavaScript , Windows
286
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 02, 2016 Jun 02, 2016

What have you tried so far? We tend to prefer helping people to learn to wriite scripts, so they can solve their own future problems, to just writing scripts on demand.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 03, 2016 Jun 03, 2016
LATEST

The question about comparing dates is fairly common. This will always require custom JavaScript since there are many different ways to format a given date.

Have you searched the forums for a solution to this issue?

Have looked at the free documentation provided by Adobe and MDN for JavaScript?

The basic process is to convert each date string to a JavaScript date object, force each date object to the same time of day, and then compare the time for each of the date objectless. The date object can provide the number of milliseconds from the fixed Epoch date and time of January 1, 1970 midnight.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines