What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Why Does My DateString Calculation Display as a Number?

    Asked by duncan_macdonald on July 03, 2014 at 06:55 AM

    HI,

    I am trying to do a date string calculation and keep getting number results instead of dates eg. 16255.58

     

    my partially completed form is https://secure.jotformpro.com/form/41817143367961

     

    Any ideas?

     

    Thanks

    datestring date calculation
  • Profile Image
    JotForm Support

    Answered by Welvin on July 03, 2014 at 08:51 AM

    Hi,

    I can't seem to find the date calculation in the given form. Did you remove the calculation widget? We'd  like to check your form for the possible cause. We can't check it unless you will re-add the calculation.

    Thanks

  • Profile Image

    Answered by duncan_macdonald on July 03, 2014 at 09:19 AM
    Sorry forgot the link kept updating and have been working on other aspects of the form.  The link should now have a calculation field at the bottom which is the problem field. 
     
    Let me know if you need any other details.
  • Profile Image
    JotForm Support

    Answered by Welvin on July 03, 2014 at 10:02 AM

    We'll check this and get back to you later today. Thank you for waiting.

  • Profile Image

    Answered by duncan_macdonald on July 16, 2014 at 10:51 PM

    Hi,

    Any Ideas on this?  I haven't heard anything back.

     

    Thanks

     

    Duncan

  • Profile Image
    JotForm Support

    Answered by ashwin_d on July 17, 2014 at 05:09 AM

    Hello Duncan,

    I did check your form and I was able to replicate the issue you are having. When you add two dates, it gives you a number.

    May I ask you what is your requirement where you want to add two given dates and what is the output you are accepting? Do you want to concatenate the two date values? Is that you want to get the different between tow dates or the day count between two dates? I would suggest you to please elaborate your requirement.

    We will wait for your response.

    Thank you!

  • Profile Image

    Answered by duncan_macdonald on July 17, 2014 at 06:49 AM
    Hi, 
     
    Thanks for your response.  I want the calculation to be a date. 
     
    I have assigned numeric values to the fields in my drop down list (Treatment Used) and want them to add to the final treatment date to give me the resulting date.  For example if the final treatment date is 14th july and the value assigned to treatment used is 2 then the calculation should show 16th july.  Is this possible? I found an example, but can't replicate it http://form.jotformpro.com/form/41832698201960
     
     
  • Profile Image
    JotForm Support

    Answered by ashwin_d on July 17, 2014 at 09:25 AM

    Hello Duncan,

    Thank you for the clarification.

    There seems to be some technical glitch where the "dateString()" function does not gets added in the "Form Calculation" wizard. For some reason, the dateString text automatically gets deleted from the formula. That is the reason you are unable to replicate the example form feature.

    I am reporting this to our back end team. We will get back to you as soon as this issue is fixed.

    Thank you!