Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Merging seperate date and time fields into a unique text field.


Not applicable
I have a dropdown Calendar Date field and a dropdown Time Field in a form and I want to create an additional Text Field that displays the combination of these two fields as a unique form field that would look like this...

Arrival Date: 1/27/2009 Arrival Time: 11:30 AM

Record Number: This would be calculated from the two fields as (012720091130)

Also when you press the submit button the XML file name would be the Record Number (this would be a coded filename to correspond to the time of arrival).

Any Ideas?
4 Replies


Level 10
Creating the Arrival time string should be easy. Its a case of adding a number of strings together. Assuming the date is held ina field called dateField and the time is in a field called timeField the javascript expression woudl look like this:

TargetField.rawValue = "Arrival Date: " + dateField.rawValue + " Arrival Time: " + timeField.rawValue;

To get the recordNumber you will have to parse the unwanted chars out of the strings then add the two together just like above.

The data file name will be the same as the PDF file that it came from. You cannot change the name of it easily without certifying the document (and that brings in its on set of problems).


Not applicable

The calc JavaScript arrivaldate.rawValue + arrivaltime.rawValue worked but is there a way to remove the "-" in the date and the ":" in the time part of the data within the calc script? Also, the minutes are removed if they are 00 (e.g. 08:00 AM will be displayed as 08).



Level 10
You can parse them (as it is just a string) and get back what you want. Javascript has a more robust set of string manipulation funtions.


Not applicable
I discoverd the correct syntax for a single form calc...


However, there is one final problem. The minutes do not show up unless they are non-zero. Any ideas on how to make sure the zero minutes carry over?