-
Sharon OwenAsked on January 25, 2023 at 6:54 PM
I just need the day digit to use in a pro-rate form for rental. I see Days() looks like it pulls out this number, but I get the days since 1970. I just want the number 20 in a jan 20, 2023 example.
-
Raymond JotForm SupportReplied on January 26, 2023 at 12:49 AM
Hi Sharon,
Thanks for reaching out to Jotform Support. To extract the day from your date picker, we have to use the Substring widget. Let me show you how to do it:
- In Form builder, click on the Add element Menu on the left.
- Under the Widgets tab, search and click on the Substring widget.
Now we have to get the Field ID of the date picker and insert it within the Substrings Souce Field ID.
- Click on the Gear icon over your Date Picker and click on the Advanced tab.
- Copy the Field ID for the day, it is "#day_2" in my example.
- Then open your Substring widget by clicking on its Wand icon and paste it to the Source Field ID. Indicate the substring start to 0 and end to 2 as well.
If you wish to perform calculations with this, I suggest linking your Substring widget within a form calculation widget which you can use to perform calculations.
Here's a link to a test form you can check.
Give it a try and let us know if you need any help.