简体   繁体   English

使用 java 脚本在 Adobe acrobat DC 中将日期月份和年份分开形成日期字段

[英]Separate Date Month and year form a date field in Adobe acrobat DC using java script

Please help me with a java script for adobe acrobat dc A user input field is available with a date given by the user.请帮助我使用 adobe acrobat dc 的 java 脚本 用户输入字段可用用户给出的日期。

The script should read this field and give the date, month and year in three seperate output fields I have a sample script here below, but when tried says 'syntax error'脚本应读取此字段并在三个单独的 output 字段中给出日期、月份和年份 我在下面有一个示例脚本,但尝试时会显示“语法错误”

var beginDate = this.getField("DateInput").valueAsString;
if (beginDate=="") event.value = " ";
esle {
var oDateValue = util.scand("mm dd, yyyy",beginDate);
event.value = util.printd("yyyy", oDateValue);} 

You have an error in your code.您的代码中有错误。 you misstyped esle , replace it with else .你打错了esle ,把它换成else

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM