-
nscrefereeformsAsked on July 4, 2025 at 4:49 PM
I'd like to be able to sort entries by the entered date/time, which are separate fields on my form.
I tried adding them together with the Form Calc widget but the result was a large integer, not a date.time serial number. Is there a way to get them combined correctly?
Alternatively, if I could get an Advanced Formula column that would be added to each submission, that would work but I don't see a way to do that either.
Suggestions?
Thanks - Al
-
Podo: Support AI AgentReplied on July 4, 2025 at 4:49 PM
To combine your separate date and time fields correctly for sorting, you can use Jotform's Advanced Formula functions in Tables, which handle date and time calculations more precisely than the Form Calculation widget. I suggest checking out the detailed guide on using Advanced Formulas in Jotform Tables to learn how to merge and format these fields properly. You can find this helpful information by using the Show Guide button below.
Show Guide -
nscrefereeformsReplied on July 4, 2025 at 4:50 PM
Is there a way to get the Advanced Formula appended to each submission? It looks like that's an after-the-fact data manipulation.
-
Podo: Support AI AgentReplied on July 4, 2025 at 4:50 PM
Hi nscrefereeforms,
Advanced Formula columns in Jotform Tables are for after-the-fact data manipulation and cannot be automatically appended to each submission as part of the form data. They allow you to create calculations and expressions that update dynamically within the table but do not alter the original submission data.
Let us know if you need further clarification.
-
nscrefereeformsReplied on July 4, 2025 at 4:51 PM
So, it's back to the Form Calc widget if I want it in every submission.
Suggestions?
-
Podo: Support AI AgentReplied on July 4, 2025 at 4:52 PM
Hi nscrefereeforms,
Yes, if you want the combined date/time value in every submission, using the Form Calculation widget with conditional logic is the way to go. You can set up an Update/Calculate Field condition to combine the date and time fields into one field that gets saved with each submission.
This method ensures the combined value is part of the submission data, unlike Advanced Formulas which only manipulate data after submission in Tables.
Let me know if you want guidance on setting up this conditional logic.
-
nscrefereeformsReplied on July 4, 2025 at 4:52 PM
Yes, please guide me through that logic.
-
Podo: Support AI AgentReplied on July 4, 2025 at 4:52 PM
Hi nscrefereeforms,
Here's how to set up the Update/Calculate Field condition to combine your date and time fields:
- Go to Settings in the Form Builder.
- Select Conditions from the left menu.
- Add a new Update/Calculate Field condition.
- Set the condition to calculate a field's value by combining your date and time fields (e.g., use the formula: DateField + TimeField).
- Choose the target field where the combined result will be saved.
This will save the combined date/time value with each submission.
If you want, I can provide more detailed steps or examples.
-
nscrefereeformsReplied on July 4, 2025 at 5:06 PM
Yes, provide detailed steps.
-
Podo: Support AI AgentReplied on July 4, 2025 at 5:06 PM
Hi nscrefereeforms,
Here are detailed steps to set up the Update/Calculate Field condition:
- Open your form in the Form Builder.
- Go to Settings and select Conditions.
- Click "Add a new condition" and choose Update / Calculate Field.
- Set the condition to always calculate the combined field by adding your date and time fields (e.g., DateField + TimeField).
- Select the target field where the combined date/time will be stored (create a new field if needed).
- Save the condition and test your form to ensure the combined value appears in each submission.
This will store the combined date/time in every submission for sorting or other uses.
-
nscrefereeformsReplied on July 4, 2025 at 5:08 PM
The time portion of the combined serial number is incorrect. I'm getting decimals like .83 for 7AM and no decimal value for 11AM.
-
Podo: Support AI AgentReplied on July 4, 2025 at 5:09 PM
Hi nscrefereeforms,
The decimals like .83 for 7AM and no decimal for 11AM happen because the Form Calculation widget treats time as a fraction of a 24-hour day, but the conversion may not match expected decimal values directly.
To fix this, ensure your time field is properly formatted and consider using functions like hours() or minutes() in calculations to convert time into consistent values before adding to the date.
If you want, I can help you with a specific formula to get accurate combined date/time values.
-
nscrefereeformsReplied on July 4, 2025 at 5:09 PM
Yes, please give me a specific formula.
-
Podo: Support AI AgentReplied on July 4, 2025 at 5:09 PM
Hi nscrefereeforms,
Try this formula in your Update/Calculate Field condition to get an accurate combined date/time:
DateField + (hours(TimeField) / 24) + (minutes(TimeField) / 1440)
This converts the time into a fraction of the day correctly by adding hours divided by 24 and minutes divided by 1440 to the date.
Test this and see if it fixes the decimal issue.
-
Rose Enterprise SupportReplied on July 4, 2025 at 5:15 PM
Hi nscrefereeforms,
Thanks for reaching out to Jotform Support. To combine the value from the date and time fields, we'll need to add the fields as String values in the formula. Let's walk through how to do it:
- In the Form Builder, click on the Add Element button.
- In the Form Elements window, go to Widgets.
- Locate the Form Calculation widget in this list, then drag and drop that element into your form.
- Add the date and time field in the formula with a space in between.
- Convert their values from Number (0-9, black) to. String (A-Z, gray) and click Update.
Here's the result:
As for the Advanced Formula function in Jotform Table, we'll also get the same result. Let's do it:
- In Jotform Table, click the Add button.
- In the menu, go to Formula.
- Select Advanced Formula from the options and click Next.
- Add the column name.
- Select the date and time fields to add them to the formula
- Click Create Column.
Let us know if there’s anything else I can help you with.
-
nscrefereeformsReplied on July 5, 2025 at 1:11 PM
That's what I was missing... the text vs number toggle on the date & time fields.
Thanks for the reply!