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.
How to populate a text field from date field in another format?Asked by daviddekel on May 04, 2015 at 02:37 AM
If i have a date field thats populated like this: 2015-10-28
I need to move this over to a text box which will show the same: 2015-10-28
But when I use the update form field in the conditions it outputs as 1823984
I used the date function and it outputed as : 2015/10/28, but i need it as 2015-10-28
Is there a function to be able to do this?
I tried, but I think there's no way you can use a hyphen as the date separator when adding the date through calculation.
Your form is configured and using the DateString function for the field "Webinar Date - (Eastern time - New York)". Are you all set now or really wanted to have it as Year-Month-Date? I can submit this thread as a feature request if you want.
I have just been doing something similar.
Keep your date field as is, and your text field.
Also keep your update condition or set it as:
just add another condition to set a mask on the text field of ####-##-##
( a quicker and easier way to set the mask is to do it directly in the properties of the text box.)
It will replace the /s with -s keeping the date the same:
Very clever, Charlie. Thank you very much :)
Glad to be able to help.
It just so happened that your post popped up next to one of mine and caught my eye as I had just worked out how to reformat dates myself.
And a quicker and easier way to set the mask is to do it directly in the properties of the text box.
All the best
Thank you for the nice and simple (yet smart) way to accomplish that Charlie :)
If someone comes to this thread looking for the quicker way that you have mentioned. This is achieved by clicking on the Text Box field that you want to have the mask set on and then clicking on the Input Mask button in the toolbar and adding ####-##-##
The mask can be different if you need it what is important to note is that:
@ is used to represent a letter
# is used to represent a number
* is used to represent both letter and a number
so when you add ####-##-## you are saying that you are expecting 4 numbers and that you want - (minus dash) to be added there followed by 2 more numbers, another dash and another set of 2 numbers.
So if someone wants, it would be easy to make the date show 2015/05/05 instead of 2015-05-05, or use any number or type of filler (between the numbers) that they need.
To better assist you, I went ahead and opened a separate thread for this, please refer to this link instead: http://www.jotform.com/answers/665249. We will address it shortly.
Thank you for understanding.