Skip to main content
davnanlew
Participant
June 2, 2016
Question

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”

  • June 2, 2016
  • 2 replies
  • 315 views

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”

This topic has been closed for replies.

2 replies

Inspiring
June 3, 2016

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.

Legend
June 2, 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.