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

Dates and validation

R_Boyd
Registered: Nov 1 2007
Posts: 151

It's been a while since I've last done this and I have completely forgotten what options to use in Adobe Designer 7.0 to ensure that users can enter a valid date into a date field using the format of their choice but when they exit the field it renders in the format DD-MMM-YYYY e.g. 15-NOV-2007.

Any help or suggestions would be gratefully received!

amin.nas
Registered: Oct 3 2007
Posts: 37
I dont think it is good idea because users can enter the dates in many different formats. The best option would be to use a calender control. If thats not an option, tell the user what format they should use, and then validate the format.

For example, if the user uses YYYY-MM-DD format, you can use the following script, which is in formcalc, in the EXIT event to change it to DD-MMM-YYYY:

var varD1 = form1.DateField.rawValue
var varD2 = Date2Num (varD1, "YYYY-MM-DD")
form1.DateField.rawValue = Num2Date(varD2, "DD-MMM-YYYY")

good luck,
amin