what function or syntax i have to use to validate between two years?
for ex (if a user enters year less than 2005 and greater than a year 2007 it is invalid otherwise it is valid. the format is mm/dd/yyyy it must be validated only using the date/time field in the designer.i need the source i am using live cycle designer 8.0 plz brief it in details. i studied already the notes in site but is not helpful, it tells more about the time difference between two years, but i need to validate only years. plz try to spare ur time and try to help this beginner
[url=http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/date_time_part1/]http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/date_time_part1/[/url]
Now here's the easy way.
The LiveCycle Date field contains text in the format mm-dd-yyyy. You simple parse the year out and covert it to a number.
var nYear = Number(MyDate1.rawValue.split("-").pop());
That's it. Now you've got a numerical values for the year that can be used for comparisons.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script