I have set up a text box in a form designed in Livecycle for the purpose of a date being entered. I have successfully worked out how to check whether the date format fits the exact format I require using java. What I haven't been able to successfully do is convert a date format I don't want entered into the date format I do want entered. (Please note I'm using a text box because I've had a number of problems getting the date picker to work successfully, particularly with clients in other countries).
As such, can anyone please advise me what java code I need to convert one date format into another ie
MM/DD/YYYY to be converted to DD/MM/YYYY or
MM/DD/YYYY to be converted to DD-MMM-YYYY
Thank you for your time.
var oldDate = this.rawValue;
var nDate = util.scand("dd/mm/yyyy",oldDate);
this.rawValue = util.printd("dd-mmm-yyyy", nDate)
Any help would be appreciated. Thanks