Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Last two digits of year
  FAQ FAQ  Forum Search   Register Register  Login Login


Hi, welcome to the new Planet PDF Forum. If you have new PDF or Adobe Acrobat questions then the right place to ask them is here, in this shiny new forum.

Last two digits of year

 Post Reply Post Reply
Author
BrianG View Drop Down
New Member
New Member


Joined: 17 Jun 2012
Points: 7
Post Options Post Options   Quote BrianG Quote  Post ReplyReply Direct Link To This Post Topic: Last two digits of year
    Posted: 25 Jun 2012 at 4:51am
I have two fields, DATE1 and DATE1.  When the user enters a date into DATE1 in dd/mm/yyyy format, I would like DATE2 to to populate with just the last two digits of the year entered into the DATE1 field.  So, if 07/01/2012 is entered into DATE1, 12 would be entered into DATE2.  Thanks!
Back to Top
Sponsored Links


Back to Top
try67 View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 432
Post Options Post Options   Quote try67 Quote  Post ReplyReply Direct Link To This Post Posted: 25 Jun 2012 at 10:30am
Use this as the custom calculation script of DATE2:

var d1 = this.getField("DATE1").valueAsString;
event.value = d1.substring(d1.length-2);
- Acrobat Expert - Contact me personally at try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com
Back to Top
BrianG View Drop Down
New Member
New Member


Joined: 17 Jun 2012
Points: 7
Post Options Post Options   Quote BrianG Quote  Post ReplyReply Direct Link To This Post Posted: 25 Jun 2012 at 2:00pm
Thank you!
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.094 seconds.